jstark
February 28, 2009, 12:34am
1
Hello, i am running OSX 10.5 leopard with installed rails 2.2.2 at /
usr/bin/. Having wanted to try rails 2.3, i created a gems directory
at $HOME/gems and used ‘export GEM_HOME=$HOME/gems’. Then i gave a
'gem install rails --source http://gems.rubyonrails.org and installed
rails 2.3 at $GEM_HOME. I have also installed rake. However, when i
run ‘rails’, the rails2.2.2 is executed. Can anyone help me with this
minor problem ? Is there a way to run rails 2.3 instead of 2.2.2 ? i
would not like to uninstall rails 2.2.2.
thanks in advance
jstark
February 28, 2009, 1:53am
2
On Fri, Feb 27, 2009 at 12:10 PM, jstark [email protected] wrote:
Is there a way to run rails 2.3 instead of 2.2.2 ? i
would not like to uninstall rails 2.2.2.
You don’t need to uninstall rails – here’s my system output from
sudo gem list --local rails
*** LOCAL GEMS ***
rails (2.2.2, 2.1.0, 2.0.2, 1.2.6, 1.2.3)
If I want/need to use other than the latest version, I just put that
into
config/environment.rb e.g.
RAILS_GEM_VERSION = ‘2.1.0’ unless defined? RAILS_GEM_VERSION
Works just fine (and I’m also on Mac OS 10.5).
HTH!
Hassan S. ------------------------ [email protected]
jstark
February 28, 2009, 1:41am
3
I might do something like this just to play w/ a 2.3 rails app:
$ cd play
$ git clone git://github.com/rails/rails.git
Initialized empty Git repository in /Users/cdemyanovich/play/rails/.git/
…
Resolving deltas: 100% (73189/73189), done.
$ ruby rails/railties/bin/rails dummy
create
create app/controllers
…
create log/test.log
$ cd dummy/vendor
$ cp -R ~/play/rails/ rails
$
In other words,
go to my play directory
clone rails
use the cloned rails to make a dummy app in my play directory
go to dummy/vendor
copy rails to dummy/vendor/rails (vendoring rails instead of relying
on
2.3 early release gems)
play w/ the app
By the way, if you’d prefer something other than sqlite3 as a db, do
this in
step 3
$ ruby rails/railties/bin/rails dummy -d mysql
see rails --help for more options
Regards,
Craig
–
Craig D.
Mutually Human Software
Technology Made for Humans by humans Data Analytics Data Analytics Data has become a critical part of business for most organizations. We work with you to ensure you have confidence in your data, can properly access it, and present it in a way that...
Est. reading time: 13 minutes