Rails application working with different version

I heard about one thing, which is related with rails version. The thing
is
,i created a ruby on rails application with rails version 3.1. So we
can
execute the same rails application on another different rails version by
changing one command via console. i think this is related with the
installation of rails with* RVM(ruby version manager)*? how is it
possible?

i used this link for the ruby on rails setting up on ubuntu
http://ryanbigg.com/2010/12/ubuntu-ruby-rvm-rails-and-you/.
This link also with RVM.

*
*

  • But how is the same possible ?*
  • can anyone have another link. which using we can run the rails
    application on different rails version? *

On 19 Nov 2011, at 20:45, amvis [email protected] wrote:

I heard about one thing, which is related with rails version. The thing is ,i
created a ruby on rails application with rails version 3.1. So we can execute the
same rails application on another different rails version by changing one command
via console. i think this is related with the installation of rails with RVM(ruby
version manager)? how is it possible?

Rvm allows you to have different versions of ruby. While it does also
allow you to manage multiple sets of gems, you don’t need it for that.
Rails 3 uses bundler by default which makes it super easy to specify
which versions of gems your app uses (including the rails gems)

Fred

Thanks fred

i saw that bundler. u mean (bundle install commad). so how to use this
via console. which command is used for changing this version. can u plz
specify that?

Thanks
amvis

On 20 November 2011 04:32, amvis [email protected] wrote:

Thanks fred
i saw that bundler. u mean (bundle install commad). so how to use this via
console. which command is used for changing this version. can u plz specify
that?

It is not clear exactly what you are trying to do. Are you trying to
run an existing rails app using a different version of rails? If so
then you need to update the app to be compatible with that version,
and specify the version of Rails you want in Gemfile.

If you are a beginner, have you worked through some tutorials which
will show you how to use bundler as well as to introduce you to the
basics of rails. railstutorial.org is good and is free to use online.

Colin

I don’t know how RVM works, but if my only problem was to specify
which version of Rails to use, I’d modify my environment.rb file with
RAILS_GEM_VERSION = ‘3.1.1’ unless defined? RAILS_GEM_VERSION

… and see if it breaks.

Thanks for the reply
colin, a simple thing. Now am using rails version is 3.1.1 . i had setup
the ruby on rails on my system with RVM( *
http://ryanbigg.com/2010/12/ubuntu-ruby-rvm-rails-and-you/.*) so we have
an
application which created with rails older version 2.3.6. my question is
now how to run this older application on my new setup. can u/anyone
specify how to rectify this?

Thank you
vishnu

2011/11/20 Colin L. [email protected]:

you can install rails 2.3.6 and whatever versions of other gems that
application needs, then the app should run happily.

Also https://rvm.beginrescueend.com/workflow/rvmrc/#project could be
a good starting point to handle multiple projects having different
gemsets.

I have an isolated gemset for every single project.

At start of a project I create the project dir and run rvm use <rubyversion>@<projectname> --create --rvmrc go one dir level upwards
do again rvm use <rubyversion>@<projectname> then rails new <projectname>

I have to say, that rails 3.1 is in my default gemset, also is bundler.

If I have to use another version of rails I do gem uninstall rails
first in the corresponding gemset and then gem install rails <version>. Since I handle my gems with bundler in rails 2.x all other
steps are the same.

Bye
Norbert

On 20 November 2011 11:27, amvis [email protected] wrote:

Thanks for the reply
colin, a simple thing. Now am using rails version is 3.1.1 . i had setup the
ruby on rails on my system with
RVM(http://ryanbigg.com/2010/12/ubuntu-ruby-rvm-rails-and-you/.) so we have
an application which created with rails older version 2.3.6. my question is
now how to run this older application on my new setup. can u/anyone
specify how to rectify this?

Have a look in the rvm documentation about gemsets. Using a gemset
you can install rails 2.3.6 and whatever versions of other gems that
application needs, then the app should run happily.

Colin