RubyonRails 2.0 Preview Installation

Hi,

I bought my Mac book for few days ago right before leopard were going to
be released with RubyonRails :smiley:

It had Rails 1.2 and I want to use Rails 2.0 preview, so I typed this in
my terminal.

gem install rails --source http://gems.rubyonrails.org

Everything went well, but I still get 1.2.3 when I type in the terminal

rails -v

Do I need to do anything else to run Rails 2.0 preview?

Thanks for any help :smiley:

//Jamal

Yes, you need to get it from svn

$ svn ls http://svn.rubyonrails.org/rails/tags/rel_2-0-0_PR/

AFAIK, it won’t be packaged as a gem until it is REALLY 2.0 and not a
pre-release candidate.

On 10/28/07, Jamal S. [email protected] wrote:

Posted via http://www.ruby-forum.com/.


Rick DeNatale

My blog on Ruby
http://talklikeaduck.denhaven2.com/

I typed

svn ls http://svn.rubyonrails.org/rails/tags/rel_2-0-0_PR/

in my application folder.

#svn ls http://svn.rubyonrails.org/rails/tags/rel_2-0-0_PR/
actionmailer/
actionpack/
actionwebservice/
activerecord/
activeresource/
activesupport/
cleanlogs.sh
pushgems.rb
railties/
release.rb

Can I now use all the new features in my application like sexy migration
:smiley:

What is the difference between those two ways?

Hi, you can also do the following to install:

rake rails:freeze:edge TAG=rel_2-0-0_PR

Now, you’ll do the following:

a) create the rails app or use an existing application

b) cd into the root of your rails application

c) rake rails:freeze:edge TAG=rel_2-0-0_PR

Good luck,

-Conrad

Hi Jamal, the difference is that one installed as a GEM and the other is
installed from the rails repository for rails 2.0.0 into
<MY_RAILS_APP>/vendor/rails

In any case, you’ll need to update your environment.rb and perform

rake rails:update: configs

Good luck,

-Conrad

Hi, here’s a correction. When you installed the 2.0, you’ll need to
update
environment.rb which is located in the config directory.

a) Update the environment.rb file

change

RAILS_GEM_VERSION = ‘1.2.3’ unless defined? RAILS_GEM_VERSION

to

RAILS_GEM_VERSION = ‘2.0.0’ unless defined? RAILS_GEM_VERSION

b) save the file in step (a)

c) perform the following command in the root of the application

 rake rails:update:configs

Good luck,

-Conrad

On 10/28/07, Jamal S. [email protected] wrote:

It becomes as installed gem, right? now I just need to update in the
environment to rails version 2.0, true?

No it doesnt it just copies the snapshot directory to your machine.

Freezing it with the rake tasks is the right approach.

I’ve just had my head in making patches to rails lately rather than
installing it into a rails app.


Rick DeNatale

My blog on Ruby
http://talklikeaduck.denhaven2.com/

Thanks for helping :slight_smile:

I would choose to install it as a GEM and not copy the rails to vendor
for every project :smiley:

So I use Rick’s method?

svn ls http://svn.rubyonrails.org/rails/tags/rel_2-0-0_PR/

It becomes as installed gem, right? now I just need to update in the
environment to rails version 2.0, true?

Here we go :slight_smile:

#gem list

*** LOCAL GEMS ***

actionmailer (1.3.5.7919, 1.3.5)
Service layer for easy email delivery and testing.

actionpack (1.13.5.7919, 1.13.5)
Web-flow and rendering framework putting the VC in MVC.

actionwebservice (1.2.5)
Web service support for Action Pack.

activerecord (1.15.5.7919, 1.15.5)
Implements the ActiveRecord pattern for ORM.

activeresource (0.9.0.7919)
Think Active Record for web resources.

activesupport (1.4.4.7919, 1.4.4)
Support and utility classes used by the Rails framework.

aws-s3 (0.4.0)
Client library for Amazon’s Simple Storage Service’s REST API

builder (2.1.2)
Builders for MarkUp.

hoe (1.3.0)
Hoe is a way to write Rakefiles much easier and cleaner.

mime-types (1.15)
Manages a MIME Content-Type that will return the Content-Type for a
given filename.

rails (1.2.5.7919, 1.2.5)
Web-application framework with template engine, control-flow layer,
and ORM.

rake (0.7.3)
Ruby based make-like utility.

rspec (1.0.8)
RSpec-1.0.8 (r2338) - BDD for Ruby http://rspec.rubyforge.org/

rubyforge (0.4.4)
A script which automates a limited set of rubyforge operations.

sources (0.0.1)
This package provides download sources for remote gem installation

xml-simple (1.0.11)
A very simple API for XML processing.

ZenTest (3.6.1)
ZenTest provides 4 different tools and 1 library: zentest,
unit_diff, autotest, multiruby, and Test::Rails.

Hey Jamal, please type the command in a shell and command prompt and
send me
the result:
gem list

-Conrad

When i freeze it, it copy too many files to vendor, it take ages?

Do I need to repeat this step for every project?

After doing all the steps, I ended up getting

500 Internal Server Error

http://localhost:3000

Fixed:

http://www.ruby-forum.com/topic/129741#578900

…and autotest did not work anymore…

I want to go back to the old version?