testing-rails icon indicating copy to clipboard operation
testing-rails copied to clipboard

Versions don't coincide

Open flocela opened this issue 6 years ago • 5 comments

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 avatar Apr 25 '19 21:04 flocela

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

flocela avatar Apr 25 '19 22:04 flocela

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

andyw8 avatar Apr 25 '19 22:04 andyw8

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 avatar Apr 25 '19 23:04 flocela

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

flocela avatar Apr 25 '19 23:04 flocela

@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.

andyw8 avatar Apr 25 '19 23:04 andyw8