Rails 2.1 glitches

Hello!

I'm just switching a 2.02 app to 2.1 and it mostly works, but I
discovered these things:

(1)

Installing rails 2.1 broke the existing 2.0.2 app !

gem install rails
gem list rails

*** LOCAL GEMS ***

rails (2.1.0, 2.0.2)

$ rake db:version (on an app that has RAILS_GEM_VERSION = '2.02')

"Your config/boot.rb is outdated: Run "rake rails:update" with rake
tasks"

after running "rake rails:update" everything is ok, but now I have
2.02 app with new boot.rb script... if I take that app somewhere where
2.1 is not installed, it won't work.. and the point is that "rake
install rails" broke the existing 2.0.2 app.... I had this confirmed
by one other guy on IRC.

It was also very subtle, since I use Background Job for sending signup
emails.. and this stopped working, because it uses script/runner ...
(which also failed in the same way as db:version for example)

(2)

$ script/dbconsole production
ERROR 1045 (28000): Access denied for user 'rails'@'localhost' (using
password: NO)

//// even though the password is set in database.yml

Not sure if I'm doing something wrong here, but it surely doesn't
'just work'.

(3)

$ RAILS_ENV=production script/about
/Library/Ruby/Gems/1.8/gems/activesupport-2.1.0/lib/active_support/
dependencies.rb:275:in `load_missing_constant': uninitialized constant
Rails::Info (NameError)
  from /Library/Ruby/Gems/1.8/gems/activesupport-2.1.0/lib/
active_support/dependencies.rb:467:in `const_missing'
  from /Library/Ruby/Gems/1.8/gems/rails-2.1.0/lib/commands/about.rb:2
  from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:27:in
`gem_original_require'
  from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:27:in
`require'
  from script/about:3

Another question:

script/runner -e production
RAILS_ENV=production script/about
script/dbconsole production

hmm. Do we have some consistency issues here?

Please let me know what you think!

I'm willing to tackle some source code as well... but I'm just
starting here.. and I think it's the right time :slight_smile: GitHub for the
president ! (or smth)

David

Hi David,

Perhaps http://github.com/rails/rails/commit/0abf0da0016abc455145810d7060a10e0b56b0b6

Hello!

Ok, that explains (2) and makes sense now that I know.

tnx
david

Ok, that explains (2) and makes sense now that I know.

I think it shows we should clean up the usage output of
script/dbconsole. I'll take a look at that soon, unless you can think
of something that would have made that a little more obvious to you?

$ rake db:version (on an app that has RAILS_GEM_VERSION = '2.02')

"Your config/boot.rb is outdated: Run "rake rails:update" with rake
tasks"

This sounds like a bug with rails gem version stuff. Do you have 2.02
or 2.0.2, they'll lead to very different results.

$ RAILS_ENV=production script/about
/Library/Ruby/Gems/1.8/gems/activesupport-2.1.0/lib/active_support/
dependencies.rb:275:in `load_missing_constant': uninitialized constant
Rails::Info (NameError)
       from /Library/Ruby/Gems/1.8/gems/activesupport-2.1.0/lib/
active_support/dependencies.rb:467:in `const_missing'
       from /Library/Ruby/Gems/1.8/gems/rails-2.1.0/lib/commands/about.rb:2
       from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:27:in
`gem_original_require'
       from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:27:in
`require'
       from script/about:3

This is a bug, you should add it to a lighthouse ticket so we don't
lose track of it.

Another question:

script/runner -e production
RAILS_ENV=production script/about
script/dbconsole production

hmm. Do we have some consistency issues here?

Definitely, I'd be happy to take patches which made all that consistent.

Hi Michael,

Sorry for the delay...

This sounds like a bug with rails gem version stuff. Do you have 2.02
or 2.0.2, they'll lead to very different results.

I had 2.0.2 (so correctly specified... 2.02 was a typo.).. One other
person also reported the same problem, so it now seems it's a bug.

> $ RAILS_ENV=production script/about
> /Library/Ruby/Gems/1.8/gems/activesupport-2.1.0/lib/active_support/
> dependencies.rb:275:in `load_missing_constant': uninitialized constant
> Rails::Info (NameError)
> from /Library/Ruby/Gems/1.8/gems/activesupport-2.1.0/lib/
> active_support/dependencies.rb:467:in `const_missing'
> from /Library/Ruby/Gems/1.8/gems/rails-2.1.0/lib/commands/about.rb:2
> from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:27:in
> `gem_original_require'
> from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:27:in
> `require'
> from script/about:3

This is a bug, you should add it to a lighthouse ticket so we don't
lose track of it.

I just created the tickets for this and the above bug (2.0.2...).

> Another question:

> script/runner -e production
> RAILS_ENV=production script/about
> script/dbconsole production

> hmm. Do we have some consistency issues here?

Definitely, I'd be happy to take patches which made all that consistent.

Great.. let me get up to speed with rails source and hopefully I can
help with making that more consistent.. it may take a week or two
though.

Thank you,
david