General Question

VoodooLogic's avatar

Why does "ruby1.8 script/console" fails to invoke ruby1.8?

Asked by VoodooLogic (724points) March 11th, 2011

I’m having problems with Ruby on Rails in Ubuntu. I’ve got both versions of ruby installed on my local machine. My current project in Rails is running 2.3.5 Rails and running ruby versrion 1.9 breaks both “script/server” and “script/console”.

If I run ruby1.8 script/server, everything works fine. However, if I run ruby1.8 script/console, it breaks with errors in ruby 1.9.

Has anyone else experience this and if so, is it an Ubuntu issue or a rails issue?

Observing members: 0 Composing members: 0

2 Answers

koanhead's avatar

I’m not a Rails guru, but I have been poking around lately with a Rails app under Debian. Apparently Rails’ API is frequently broken between major versions. If your scripts are written for Rails 1.8, running them under Rails 2.0 will almost certainly break them without some glue code to smooth over the differences. For example (and IIRC) between Rails 2.0 and Rails 2.2 somewhere ‘require_gem’ was deprecated in favor of ‘gem’, which breaks pretty much any reasonably complex app.
Another thing I’ve found is that the Debian packaged versions of Rails and Ruby are set up to work together, but they are intolerant of other versions (whether installed by apt or by gem install.) I’ve so far gotten around this by installing ruby-1.8 and rubygems under apt and then gem installing rails.

I’ve been keeping a blog about this project, you can check it out if you want the gory details.

VoodooLogic's avatar

I made the decision to install rvm (ruby version manager) and it has made all the difference with collaboration and system/app stability.

Answer this question




to answer.

This question is in the General Section. Responses must be helpful and on-topic.

Your answer will be saved while you login or join.

Have a question? Ask Fluther!

What do you know more about?
Knowledge Networking @ Fluther