Hmm. You shouldn't build the 1.2.5 project with the 2.0.2 rails
command. After installing the 1.2.5 gem, you can execute the rails
command in that gem directly:
$ ruby /usr/local/lib/ruby/gems/1.8/gems/rails-1.2.5/bin/rails
my_app_name
If you installed ruby gems someplace different, just fix the path to
point to the right place.
--
Josh Susser
http://blog.hasmanythrough.com
--
Posted via http://www.ruby-forum.com/.
>
> Ryan Bigg wrote:
>> You can do:
>>
>> gem install rails -v=1.2.5
>> rails -d mysql
>>
>> and then manually change the RAILS_GEM_VERSION in config/
>> environment.rb.
>
> Hmm. You shouldn't build the 1.2.5 project with the 2.0.2 rails
> command. After installing the 1.2.5 gem, you can execute the rails
> command in that gem directly:
>
> $ ruby /usr/local/lib/ruby/gems/1.8/gems/rails-1.2.5/bin/rails
> my_app_name
or rails _1.2.5_ myapp
Executables created with gem are smart enough to see the version
argument and work out that they should be loading that version
Fred
But now I want to switch to Rails v. 1.2.6 to follow the book: 'Agile
Web Dev with Rails'.
So I did the following:
[/Users/Ric/workarea/ruby]gem install rails -v=1.2.6
ERROR: While executing gem ... (Gem::RemoteFetcher::FetchError)
getaddrinfo: nodename nor servname provided, or not known
(SocketError)
getting size of http://gems.rubyforge.org/Marshal.4.8
What's going on here?
Is it possible to toggle Rails versions like 1.2.6 <---> 2.0.2?
What am I missing?
Env: Mac OS X (Leopard).
Ric.
> --
> Ryan Bigg
> http://www.frozenplague.net
> Feel free to add me to MSN and/or GTalk as this email.
[/Users/Ric/workarea/ruby]sudo gem install rails -v="1.2.6"
Password:
Bulk updating Gem source index for: http://gems.rubyforge.org
Successfully installed rails-1.2.6
1 gem installed
[/Users/Ric/workarea/ruby]gem list | grep 'rails'
rails (2.0.2, 1.2.6, 1.2.5)
[/Users/Ric/workarea/ruby]gem environment
RubyGems Environment:
- RUBYGEMS VERSION: 1.0.1 (1.0.1)
- RUBY VERSION: 1.8.6 (2007-03-13 patchlevel 0) [i686-darwin8.10.1]
- INSTALLATION DIRECTORY: /opt/local/lib/ruby/gems/1.8
- RUBY EXECUTABLE: /opt/local/bin/ruby
- RUBYGEMS PLATFORMS:
- ruby
- x86-darwin-8
- GEM PATHS:
- /opt/local/lib/ruby/gems/1.8
- GEM CONFIGURATION:
- :update_sources => true
- :verbose => true
- :benchmark => false
- :backtrace => false
- :bulk_threshold => 1000
- REMOTE SOURCES:
- http://gems.rubyforge.org
[/Users/Ric/workarea/ruby]rails --version
Rails 2.0.2
---
I'm a little lost here.
What I want to do is, to toggle from Rails 2.0.2 to 1.2.6 so I can
follow the codes in the AWDR book (based on 1.2.5). I had updated rails
to 1.2.6. <-- I don't think I need to do this, since I have the
following:
rails (2.0.2, 1.2.6, 1.2.5)
So...
I'm assuming that all I need to do is to modify the following in
config/environment.rb:
# Specifies gem version of Rails to use when vendor/rails is not present
RAILS_GEM_VERSION = '2.0.2' unless defined? RAILS_GEM_VERSION
to -->RAILS_GEM_VERSION = '1.2.6'.
Then I should be able to code per AWDR book?
Sigh...
...I'll give it a go.
Ric.
===============
No, I don't think so because the rails app you generated has the
structure of a 2.0 app.
But you can generate a NEW rails 1.2.6 project like this
$rails _1.2.6_ myproject
--
Rick DeNatale
My blog on Ruby
http://talklikeaduck.denhaven2.com/