thoughtbot / testing-rails

Source code for the Testing Rails book
Other
279 stars 49 forks source link

Versions don't coincide #97

Open flocela opened 5 years ago

flocela commented 5 years ago

Just bought the testing-rails book. It referred me to this application. I have ruby 2.6.2. $: bin/rails server Results in: Your Ruby version is 2.6.2, but your Gemfile specified 2.2.0

Switched to version 2.2.0 $bin/build Results in No such file or directory $: bin/rails server Results in Error installing bundler: bundler requires Ruby version >= 2.3.0.

Switched to version 2.3.0 $ gem install bundler Results in 1 gem installed $bin/setup results in Your Ruby version is 2.3.0, but your Gemfile is 2.2.0

It looks like Ruby 2.2.0, 2.3.0, and 2.6.2 don't work with this application. How can I make the application work?

Thanks, Flo

flocela commented 5 years ago

Using version 2.2.0 $ bin/setup Results in == Installing dependencies == ERROR: Error installing bundler: bundler requires Ruby version >= 2.3.0. rbenv: bundle: command not found

The `bundle' command exists in these Ruby versions: 2.3.0 2.6.2

andyw8 commented 5 years ago

@flocela Bunder 2.x requires Ruby 2.3. It should work with Bundler 1.17.3 (the latest 1.x release).

flocela commented 5 years ago

Thanks andyw8! My new problem is this $bundle install An error occurred while installing nokogiri (1.6.6.2), and Bundler cannot continue. Results in Make sure that gem install nokogiri -v '1.6.6.2' --source 'https://rubygems.org/' succeeds before bundling. I tried $ gem uninstall nokogiri $ xcode-select --install $ gem install nokogiri Results in Fetching: mini_portile2-2.4.0.gem (100%) Successfully installed mini_portile2-2.4.0 Fetching: nokogiri-1.10.3.gem (100%) ERROR: Error installing nokogiri: nokogiri requires Ruby version >= 2.3.0.

I'm actually always getting caught up in version problems. Is there some website that explains how all the gems fit together with the bundler and ruby versions?

flocela commented 5 years ago

I believe I am using the right bundler after your suggestion.

gem install bundler -v "=1.17.3" Fetching: bundler-1.17.3.gem (100%) Successfully installed bundler-1.17.3 1 gem installed

andyw8 commented 5 years ago

@flocela The error is suggesting that you install Nokogiri 1.6.6.2, but gem install nokogiri would install the latest. Try run gem install nokogiri -v '1.6.6.2' to see what the output is.