user1951270
user1951270

Reputation: 31

Updated Ruby to 1.9.3, Gems on existing app now causing errors

I have written a Rails app in Ruby 1.8 with various gems all working without issue. Via RVM, I'm now running 1.9.3 (and yes, I do need 1.9.x), but the development server won't start, instead throwing the following error:

$ rails s
/usr/lib/ruby/vendor_ruby/1.8/rubygems/dependency.rb:247:in `to_specs': Could not find railties (>= 0) amongst [bigdecimal-1.1.0, bundler-1.2.4, io-console-0.3, json-1.5.5, minitest-2.5.1, rake-10.0.3, rake-0.9.2.2, rdoc-3.9.5, rubygems-bundler-1.1.0, rvm-1.11.3.6] (Gem::LoadError)
from /usr/lib/ruby/vendor_ruby/1.8/rubygems/dependency.rb:256:in `to_spec'
from /usr/lib/ruby/vendor_ruby/1.8/rubygems.rb:1208:in `gem'
from /usr/local/bin/rails:18

So, I imagine the app at least is still looking for 1.8 gems. What do I need to do?

$ ruby -v && gem -v
ruby 1.9.3p392 (2013-02-22 revision 39386) [x86_64-linux]
1.8.25

UPDATE

Running

gem install railties

appeared to work, but railties still didn't show up in gem list and the server still wouldn't start. For the hell of it, I tried it again, and this time the gem (and its dependencies) do seem to have actually installed.

However, I still need to run bundle install, which (after specifying the correct Ruby version in my Gemfile) gives me the following ..

$ sudo bundle install
Your Ruby version is 1.8.7, but your Gemfile specified 1.9.3
$ ruby -v
ruby 1.9.3p392 (2013-02-22 revision 39386) [x86_64-linux]

Upvotes: 0

Views: 840

Answers (1)

user1951270
user1951270

Reputation: 31

This was being caused by a conflict with Ruby 1.8. Removing that (by plain old apt-get) fixed the issue.

Upvotes: 1

Related Questions