rails application working with different version

19 views
Skip to first unread message

amvis

unread,
Nov 19, 2011, 3:45:45 PM11/19/11
to rubyonra...@googlegroups.com

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? 

Frederick Cheung

unread,
Nov 19, 2011, 4:46:28 PM11/19/11
to rubyonra...@googlegroups.com, rubyonra...@googlegroups.com


On 19 Nov 2011, at 20:45, amvis <vgrkr...@gmail.com> 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
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? 

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/wzhmj1Pra3MJ.
To post to this group, send email to rubyonra...@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-ta...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

amvis

unread,
Nov 19, 2011, 11:32:18 PM11/19/11
to rubyonra...@googlegroups.com
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

Colin Law

unread,
Nov 20, 2011, 3:52:46 AM11/20/11
to rubyonra...@googlegroups.com

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

amvis

unread,
Nov 20, 2011, 6:27:11 AM11/20/11
to rubyonra...@googlegroups.com
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 

Phillip

unread,
Nov 20, 2011, 10:17:45 AM11/20/11
to Ruby on Rails: Talk
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.

On Nov 20, 6:27 am, amvis <vgrkrish...@gmail.com> 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

Colin Law

unread,
Nov 20, 2011, 11:05:11 AM11/20/11
to rubyonra...@googlegroups.com

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

Norbert Melzer

unread,
Nov 20, 2011, 1:05:02 PM11/20/11
to rubyonra...@googlegroups.com
2011/11/20 Colin Law <cla...@googlemail.com>:

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

Reply all
Reply to author
Forward
0 new messages