WebFaction
Community site: login faq

Hi, I tried to upgrade to ruby on rails 4.1.0 but it fails.

I move into my rails app generated by webfaction installer script (ruby 2.0.0/rails4.0.4) and I run these commands:

export GEM_HOME=$PWD/gems export RUBYLIB=$PWD/lib export PATH=$PWD/bin:$PATH

I try to install the gems locally instead of trying to install it where I don't have permissions to.

Then I run:

gem install rails --version 4.1.0

and I get this:

ERROR: Error installing rails: activesupport requires Ruby version >= 1.9.3.

asked 21 May '14, 11:33

markzism
113
accept rate: 0%


You should be able to update to Rails 4.1.0 as follows:

First, change to your Rails app directory:

cd ~/webapps/my_app

Then set your environment variables:

export GEM_HOME=$PWD/gems
export RUBYLIB=$PWD/lib
export PATH=$PWD/bin:$PATH

You could just run "gem update" at this point to update all of your installed gems to their latest version, or you can go into your Rails project directory, eg..

cd hello_world

... then edit your Gemfile to set the Rails version you want, eg:

gem 'rails', '4.1.0'

... then update with bundler:

bundle update

Once all of that is done, restart your app:

~/webapps/my_app/bin/restart

Hope that helps!

permanent link

answered 21 May '14, 18:45

seanf
12.2k41836
accept rate: 37%

Thanks for that, I forgot I should use the 'gem update'. :S

The strange thing is though that I still get this error: $ gem update Updating installed gems Updating actionmailer ERROR: Error installing actionmailer: activesupport requires Ruby version >= 1.9.3. Updating actionpack ERROR: Error installing actionpack: activesupport requires Ruby version >= 1.9.3. Updating activemodel ERROR: Error installing activemodel: activesupport requires Ruby version >= 1.9.3.

It does not use the ruby 2.0.0

When i do 'ruby -v' it states: ruby 2.0.0p247 (2013-06-27 revision 41674) [x86_64-linux]

(22 May '14, 07:41) markzism

This seems to work now. I have create a new rails 4.0.4 ruby 2.0.0 application and gem updated before anything else. So I think it was some problem in the previous application. Thanks!

(22 May '14, 12:21) markzism

See comment above!

(22 May '14, 12:21) markzism
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×108
×81

question asked: 21 May '14, 11:33

question was seen: 1,824 times

last updated: 22 May '14, 13:36

WEBFACTION
REACH US
SUPPORT
AFFILIATE PROGRAM
LEGAL
© COPYRIGHT 2003-2019 SWARMA LIMITED - WEBFACTION IS A SERVICE OF SWARMA LIMITED
REGISTERED IN ENGLAND AND WALES 5729350 - VAT REGISTRATION NUMBER 877397162
5TH FLOOR, THE OLD VINYL FACTORY, HAYES, UB3 1HA, UNITED KINGDOM