Help with rails on mac


#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


#2

On Fri, Feb 27, 2009 at 12:10 PM, jstark removed_email_address@domain.invalid 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. ------------------------ removed_email_address@domain.invalid


#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,

  1. go to my play directory
  2. clone rails
  3. use the cloned rails to make a dummy app in my play directory
  4. go to dummy/vendor
  5. copy rails to dummy/vendor/rails (vendoring rails instead of relying
    on
    2.3 early release gems)
  6. 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
http://mutuallyhuman.com