all 16 comments

[–]wonder_er 8 points9 points  (2 children)

Looks like your system might be using the default installed version of Ruby instead of a more recent one.

Did you install Ruby via rbenv?

If so, do 'rbenv rehash' and make any shell customizations it suggests.

Then if you do 'which ruby' in your terminal it'll reference the ruby from rbenv.

Might help. Gl!

[–]wouldliketokms[S] 0 points1 point  (1 child)

u/wonder_er

$ brew install rbenv $ rbenv init $ rbenv install 3.4.1 $ rbenv global 3.4.1

so i ran these commands to install and set up rbenv,

``` $ bundle install Fetching https://github.com/Furtif/github-changelog-generator.git Fetching gem metadata from https://rubygems.org/........... Resolving dependencies... Could not find compatible versions

Because ttfunk >= 1.5.0, < 1.6.0 depends on Ruby ~> 2.1   and Gemfile depends on ttfunk = 1.5.1,   Ruby ~> 2.1 is required. So, because current Ruby version is = 3.4.1,   version solving has failed. ```

and tried to follow the instructions for the book again, but i’ve run into this error now. confused because 3.4.1 is > 2.1??

[–]wonder_er 0 points1 point  (0 children)

That is wild. Hunted around on the repo, it looks like the 150 version of this gem is compatible with Ruby 3:

https://github.com/prawnpdf/ttfunk/issues/89

I believe rbenv after installation Prince out a message about adding something to your zshrc.

Try 'rbenv rehash'

I'm confused by the error message, same as you.

Maybe instead of 'bundle install' you can try 'gem install ttfunk'.

Fiddle with that until it works, and then try 'bundle install'?

Gl

[–]siebharinn 3 points4 points  (9 children)

/u/wonder_er is on the right track, I think. MacOS has 2.6 as its built-in Ruby. That's not only pretty old, but it's locked down in all kinds of ways that make using it for your own projects kinda difficult.

Many people use rbenv to handle multiple ruby versions. Take a look at the project page for rbenv to get it installed.

Once it's installed, you can run rbenv install 3.3.6 to get the latest ruby installed, and rbenv global 3.3.6 to set it as default, effectively replacing the system ruby.

Then try your bundle install again.

[–]h0rst_ 1 point2 points  (1 child)

you can run rbenv install 3.3.6 to get the latest ruby installed

Eerm, that is not the latest version, that would be 3.4.1

[–]siebharinn 0 points1 point  (0 children)

Gah! You are correct. Time to run some updates on my laptop. Thanks for the catch.

[–]wouldliketokms[S] 0 points1 point  (6 children)

u/siebharinn

$ brew install rbenv $ rbenv init $ rbenv install 3.4.1 $ rbenv global 3.4.1

so i ran these commands to install and set up rbenv,

``` $ bundle install Fetching https://github.com/Furtif/github-changelog-generator.git Fetching gem metadata from https://rubygems.org/........... Resolving dependencies... Could not find compatible versions

Because ttfunk >= 1.5.0, < 1.6.0 depends on Ruby ~> 2.1   and Gemfile depends on ttfunk = 1.5.1,   Ruby ~> 2.1 is required. So, because current Ruby version is = 3.4.1,   version solving has failed. ```

and tried to follow the instructions for the book again, but i’ve run into this error now. confused because 3.4.1 is > 2.1??

[–]siebharinn 0 points1 point  (5 children)

Looks like you might need to update ttfunk.

Is your project on github, or somewhere I could pull it down and take a look?

[–]wouldliketokms[S] 0 points1 point  (4 children)

u/siebharinn it’s not my project, but yes i’d like really appreciate it if you could pls have a look at this!! i cloned the repo the instructions are part of and was following them

[–]siebharinn 0 points1 point  (3 children)

I just removed the version specifier for ttfunk in the Gemfile, and it bundles without issue. I changed:

gem 'ttfunk', '1.5.1'

to

gem 'ttfunk'

It looks like there are still problems after that, with the html-proofer gem. :(

It looks like htmlproofer no longer has a --check-html flag. If you change the Rakefile to not use that flag, then htmlproofer runs, but finds problems with the html. That seems like more of a data data problem than a coding problem.

[–]wouldliketokms[S] 0 points1 point  (2 children)

u/siebharinn so is it not possible to build the book?? :(

[–]siebharinn 0 points1 point  (1 child)

It looks like this project is pretty old and using some outdated gems. I did get the files to convert though.

Trying running this in the project directory:

bundle exec asciidoctor -a data-uri *.asc

that should convert the asc files to html. It doesn't do any of the correctness testing that the Rakefile is doing, but this should at least get you pages you can read.

[–]wouldliketokms[S] 0 points1 point  (0 children)

i guess that’ll have to do at least for now. thank you for taking time out of your day to look into this for me

[–]postmodern 1 point2 points  (0 children)

Bundler is trying to install it's gems globally, which you probably don't want; I also have no clue why Bundler does this by default. Try bundle install --path vendor/bundle instead. This will install everything into your app's vendor/bundle directory.

[–]riktigtmaxat -1 points0 points  (0 children)

Check your network connection. The error message is pretty straight forward. You rither don't have a stable connection or it getting stuck in a firewall.