Stupid newbie question

On Jun 3, 9:19pm, Norm S. [email protected] wrote:

for a while is that you have an app written to an old rails version.
You must duplicate that environment as a first step and get the app
running in that environment to have any chance of updating it in any way.

Well. On the server if I run ruby -version I see there is 1.8.7
The same I also have (But maybe ont selected)

Strange, when I run rails -v I see the message
The program ‘rails’ is currently not installed. You can install it by
typing:
sudo apt-get install rails

Very strange.

Then I go to the application. At the same level as the folders app and
config (thus, the root for the app) I see a file named Gemfile.
Among the content I can see:

source ‘http://rubygems.org
gem ‘rails’, ‘3.0.3’
gem ‘sqlite3-ruby’, :require => ‘sqlite3’
gem ‘curb’
gem ‘nokogiri’
gem ‘mysql2’

So on the server there is rails 3.0.3? Why didnt it appear when I run
rails -v?
And what about having version 1.2.6. Is that the problem? Where do I
begin for upgrading to it? Sigh (I will also read the latest answers
from gnarmis and noel maybe I find something there)

There’s probably going to be lots more pain related to any gems used
in that app.

All in all seems like about time that app get some serious love and
get updated at least to Rails 2.3 Ruby 1.8.7

Hmm, I wrote my replies assuming it was Rails 1.2.6. If your app’s
Gemfile
has that info, it pretty much is Rails 3.0.3. In that case, try
installing
rvm, and then…

rvm install 1.8.7
rvm install 1.8.6

Now you can experiment with both versions of ruby. To use a specific
one,

rvm use 1.8.7
(to check…)
ruby -v

Now, you can create an isolated gemset, which is what it sounds like. To
do
that:

rvm use 1.8.7
rvm gemset create your_app_name
(and use this gemset as…)
rvm gemset use your_app_name
(to check installed gems…)
gem list

Now you have an isolated environment with which to experiment. Check rvm
for
docs and help.

Check your gemfile again and do:
gem install rails 3.0.3 (if that’s what it is)
bundle install (installs the gems in the gemfile for you)
rails s

Hope this works out!

Hello guys

So, finally I make it work. For those that could experience same
problem as me, I can tell how I did.
I have a mac 10.5.8
Preinstalled was ruby 1.8.6 and rails version 1.something.
Tried different ways but none worked (macports, rvm, locomotive etc).
But on the ruby site there is a one click installer. That saved me.
Installed that. Then I run a gem update system and finally gem install
rails.
Now I have ruby 1.8.7 and rails version 3.
And running my webrick works. Everything works.