1

I' trying to make my first steps with Ruby on Rails. I'm working on a Ubuntu 14.04. As suggested by a website, I've installed rvm to manage my Ruby installations and gem sets. The commands I've used are

rvm install ruby-1.9.2-p320 rvm use --default 1.9.2-p320 gem install rails -v 3.0 

At the moment, this is the situation with the installation

<01/nov 15:25> [Ruby_On_Rails]$ rvm list rvm rubies =* ruby-1.9.2-p320 [ x86_64 ] ruby-1.9.3-p547 [ x86_64 ] ruby-2.1.2 [ x86_64 ] ruby-head [ x86_64 ] # => - current # =* - current && default # * - default 

and here is the gemset list

<01/nov 15:28> [Ruby_On_Rails]$ rvm gemset list gemsets for ruby-1.9.2-p320 (found in /home/lorenzo/.rvm/gems/ruby-1.9.2-p320) => (default) global 

finally, here is the gem list

<01/nov 15:30> [Ruby_On_Rails]$ gem list *** LOCAL GEMS *** abstract (1.0.0) actionmailer (3.0.0) actionpack (3.0.0) activemodel (3.0.0) activerecord (3.0.0) activeresource (3.0.0) activesupport (3.0.0) arel (1.0.1) builder (2.1.2) bundler (1.7.4, 1.0.22) bundler-unload (1.0.2) erubis (2.6.6) executable-hooks (1.3.2) gem-wrappers (1.2.7) i18n (0.7.0.beta1, 0.4.2) json (1.8.1) mail (2.2.20) mime-types (1.25.1) minitest (5.4.2, 1.6.0) polyglot (0.3.5) rack (1.2.8) rack-mount (0.6.14) rack-test (0.5.7) rails (3.0.0) railties (3.0.0) rake (0.8.7) rdoc (2.5.8) rubygems-bundler (1.4.4) rvm (1.11.3.9) thor (0.14.6) thread_safe (0.3.4) treetop (1.4.15) tzinfo (1.2.2, 0.3.42) 

When I try to launch rails new, it gives me an error becuse one of the ruby gems is in conflict with rails 3.0

<01/nov 15:22> [Ruby_On_Rails]$ rails --version /home/lorenzo/.rvm/rubies/ruby-1.9.2-p320/lib/ruby/site_ruby/1.9.1/rubygems/specification.rb:2064:in `raise_if_conflicts': Unable to activate rails-3.0.0, because bundler-1.7.4 conflicts with bundler (~> 1.0.0) (Gem::LoadError) from /home/lorenzo/.rvm/rubies/ruby-1.9.2-p320/lib/ruby/site_ruby/1.9.1/rubygems/specification.rb:1262:in `activate' from /home/lorenzo/.rvm/rubies/ruby-1.9.2-p320/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_gem.rb:54:in `gem' from /home/lorenzo/.rvm/gems/ruby-1.9.2-p320/bin/rails:22:in `<main>' from /home/lorenzo/.rvm/gems/ruby-1.9.2-p320/bin/ruby_executable_hooks:15:in `eval' from /home/lorenzo/.rvm/gems/ruby-1.9.2-p320/bin/ruby_executable_hooks:15:in `<main>' 

In fact, I have two versions of bundler. I'm not an expert, but I think that "bundler (~> 1.0.0)" means bundler 1.0.x, so it gives me problem because the version is "too new" for rails. Now I'd like to understant the "correct" action to perform to make a coherent situation. Should I uninstall bundler 1.7.2? Are ruby 1.9.2 and rails 3.0 incompatible?

The main problem is that I'm new with Ruby, so maybe there is something obiouvs that I've not seen in the outputs of the commands. I've tried to google a bit, but I've found anything, so any help would be appreciated.

7
  • Rails 3.0 is very old. Is there any reason you're not using a modern version of Rails, like Rails 4.1? If not, learn Rails 4.1. Much of the specifics you learn in Rails 3.0 have gone away or changed significantly, so you're learning stuff that isn't actually useful in new applications. There are some very large and extremely important parts of Rails you're missing like the entire asset pipeline. Commented Nov 1, 2014 at 14:51
  • Good question :) I've just found a rails 3.0 book. I think it's good enough to unserstand the basics of the framework... and moreover it was a good way to understand a bit better how rvm works (i.e. create a separate installation, gemset, etc etc) Commented Nov 1, 2014 at 14:55
  • 1
    It's really not a good idea. At least learn Rails 3.2, which is the most recent 3.x version. Rails 3.0 is pretty much dead, and lacks some major functionality that is now extremely core to developing Rails applications. Commented Nov 1, 2014 at 15:01
  • does rails 3.2 still work with ruby 1.9.2? Commented Nov 1, 2014 at 15:03
  • Rails 3.2 will work with Ruby 1.8.7 or newer, but you should at least be on Ruby 1.9. Commented Nov 1, 2014 at 15:05

1 Answer 1

1

Try:

gem uninstall bundler gem install bundler --version '1.0.0' 

then:

bundle 

P.S

I totally agree with @meagar, unless you are forced to with legacy code you should move forward to a more recent version of rails ... you will miss lots of fun!

Sign up to request clarification or add additional context in comments.

1 Comment

It worked, I just directly tried gem install rails instead of installing bundler alone.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.