TurnKey Linux Virtual Appliance Library

Upgrading to Rails 3

Hi!

I've been experimenting a bit with the Turnkey appliances in recent weeks, and I've found them to be a great option to quickly and easily set up a VPS for a dedicated task. I'm currently in the initial prototyping stages of a website I want to code using Ruby on Rails, which will eventually be deployed on a VPS running the Turnkey Rails appliance.

Since I haven't started coding yet, and since Rails 3 has now been officially released, I'll be using Rails 3 for the site. However, I've been having some major problems getting Rails 3 installed on the Rails appliance.

Rails 3 requires Ruby 1.8.7, while the Rails appliance only has 1.8.6. If I read it correctly, 1.8.6 is the latest version that can be installed using apt-get in Ubuntu 8.0.4 .. I've tried installing from source, and while the install itself works, running gem install rails gives me a "rails 3 requires ruby => 1.8.7" message.

I've changed the symlink in /usr/bin to point to the newly installed ruby (1.9.2 in this case, one of the recommended versions), and running ruby -v also says 1.9.2 is installed. Gem however, seems to think ruby 1.8.6 is still installed.

I've also tried using RVM, but while that also installed fine, trying to change the ruby version just didn't work ;)

Has anyone been able to get Rails 3 to work on the current Rails appliance?

 

I'm no linux expert here, which is mainly why the turnkey appliances are so interesting, but it would be rather nice to be able to upgrade to Rails 3 on the current appliance, considering there's no known release date for the new appliances.

I haven't work with this appliance

But you may try installing gem from source too. Be sure that when you type ruby -v you get the desired version, and then download the latest rubygem from www.rubygems.org and install it. That should get you a gem command tied with your current version of ruby.

Then, install rails 3 and you should be ready to go. RVM is a nice piece of software, its rare that it didn't work for you. 

Thanks for the advice

Thanks for the advice ;)

 

I actually managed to get RVM working using this guide: http://blog.injekt.net/9/rvm-plays-nice-on-production .. Managed to install Rails 3 as well. However, I'm really not sure if this is a good way of doing it, considering that there's multiple versions of Ruby installed. Using the guide though, I can create Rails 3 projects, and the built-in developer server works as well. I haven't tried moving it to Apache though.

Post new comment

The content of this field is kept private and will not be shown publicly. If you have a Gravatar account, used to display your avatar.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <p> <span> <div> <h1> <h2> <h3> <h4> <h5> <h6> <img> <map> <area> <hr> <br> <br /> <ul> <ol> <li> <dl> <dt> <dd> <table> <tr> <td> <em> <b> <u> <i> <strong> <font> <del> <ins> <sub> <sup> <quote> <blockquote> <pre> <address> <code> <cite> <strike> <caption>

More information about formatting options

Leave this field empty. It's part of a security mechanism.
(Dear spammers: moderators are notified of all new posts. Spam is deleted immediately)