Plugins problems with RoR 1.1 in production


#1

Hi,

I’m looking to upgrade an application based on rails 1.0, and I have a
problem with plugins working fine in development, but not in
production or test. Actually, it happens in all environments with
their dependency mechanism set to :load.

For example for the selenium on rails plugin, it needs the class
SeleniumOnRailsConfig, which triggers the dependency on
‘selenium_on_rails’. First, the file ‘rails/selenium_on_rails’ is
searched. If cannot be loaded, it raises the exception LoadError. The
problem I see is that only MissingSourceFile exceptions are treated in
activesupport/lib/active_support/dependencies.rb on line 102. When
the dependency mechanism is :load, it stops here.

When the exeption MissingSourceFile is raised (happens in development
where the dependency mechanism is :require), it tries to use the file
“selenium_on_rails”, without the “rails/” prefix and it succeeds.

Anyone know how I can fix this?

Here is the svninfo from vendor/rails (where I checked out a stable
version some time ago, and I updated it with svn update):

Path: .
URL: http://dev.rubyonrails.org/svn/rails/branches/stable
Repository UUID: 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Revision: 4214
Node Kind: directory
Schedule: normal
Last Changed Author: rick
Last Changed Rev: 4212
Last Changed Date: 2006-04-14 16:14:27 +0200 (Fri, 14 Apr 2006)
Properties Last Updated: 2006-04-08 10:21:32 +0200 (Sat, 08 Apr 2006)

Thanks

Raph


#2

Hi Raph,

I just tried to install Rails 1.1.2 (on ruby 1.8.2 (2004-12-25)
[i386-mswin32]), created a new app and installed Selenium on Rails. It
seems like everything is working just fine (rake test_plugins, accessing
/ and /selenium/).

Do you have this problem with newly created apps or just your Rails 1.0
app?

Hope you’re able to sort it out!

Cheers,
Jonas Bengtsson

Raphael B. wrote:

Hi,

I’m looking to upgrade an application based on rails 1.0, and I have a
problem with plugins working fine in development, but not in
production or test. Actually, it happens in all environments with
their dependency mechanism set to :load.

For example for the selenium on rails plugin, it needs the class
SeleniumOnRailsConfig, which triggers the dependency on
‘selenium_on_rails’. First, the file ‘rails/selenium_on_rails’ is
searched. If cannot be loaded, it raises the exception LoadError. The
problem I see is that only MissingSourceFile exceptions are treated in
activesupport/lib/active_support/dependencies.rb on line 102. When
the dependency mechanism is :load, it stops here.

When the exeption MissingSourceFile is raised (happens in development
where the dependency mechanism is :require), it tries to use the file
“selenium_on_rails”, without the “rails/” prefix and it succeeds.

Anyone know how I can fix this?

Here is the svninfo from vendor/rails (where I checked out a stable
version some time ago, and I updated it with svn update):

Path: .
URL: http://dev.rubyonrails.org/svn/rails/branches/stable
Repository UUID: 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Revision: 4214
Node Kind: directory
Schedule: normal
Last Changed Author: rick
Last Changed Rev: 4212
Last Changed Date: 2006-04-14 16:14:27 +0200 (Fri, 14 Apr 2006)
Properties Last Updated: 2006-04-08 10:21:32 +0200 (Sat, 08 Apr 2006)

Thanks

Raph