Stupid newbie question

This tells you what rails is installed on your system (at least what is in your path). The real question is what rails version the application is running with on the target system wherever that is. You need to run ‘rails -v’ on that system or look in config/environment.rb. Towards the top there should be a line defining the ‘RAILS_GEM_VERSION’. This tells you what version of rails you need to use to duplicate the present production environment. Another possibility would be if rails were frozen into the system (unlikely). In this case you would find rails in the directory ‘vendor/rails’ and all of your plugins in ‘vendor/plugins’ etc. The most likely case given that this has apparently been around 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.

Good luck

Norm

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)

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.