This project is archived and is in readonly mode.
uninitialized constant Merb ActionController
Reported by Nicholas Faiz | February 10th, 2009 @ 11:49 PM | in 2.x
This is a bit of a mixed ticket - about a dependency on Merb in 2.3 rc 1 and a namespace error for Row in the csv lib and something else.
Running cucumber webrat tests on 2.3 rc1 source gives us errors like this, with the litany of merb gems installed but not configured in config/environment.rb .
<prFeature: Selecting Images #
features/plain/manage/image_select.feature As a Content
Manager/Admin I can assign an image to a Factsheet Scenario:
Content Manager can browse and select an image #
features/plain/manage/image_select.feature:6 Given I login as cm #
features/step_definitions/webrat_steps.rb:131 uninitialized
constant Merb (NameError)
/usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.0/lib/active_support/dependencies.rb:443:in
load_missing_constant'
/usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.0/lib/active_support/dependencies.rb:80:in
const_missing'
/usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.0/lib/active_support/dependencies.rb:92:in
const_missing'
/usr/local/lib/ruby/gems/1.8/gems/webrat-0.3.4/lib/webrat/core/field.rb:70:in
to_param'
/usr/local/lib/ruby/gems/1.8/gems/webrat-0.3.4/lib/webrat/core/form.rb:83:in
params'
/usr/local/lib/ruby/gems/1.8/gems/webrat-0.3.4/lib/webrat/core/form.rb:82:in
each'
/usr/local/lib/ruby/gems/1.8/gems/webrat-0.3.4/lib/webrat/core/form.rb:82:in
params'
/usr/local/lib/ruby/gems/1.8/gems/webrat-0.3.4/lib/webrat/core/form.rb:48:in
submit'
/usr/local/lib/ruby/gems/1.8/gems/webrat-0.3.4/lib/webrat/core/field.rb:163:in
click'
/usr/local/lib/ruby/gems/1.8/gems/webrat-0.3.4/lib/webrat/core/scope.rb:149:in
clicks_button'
/usr/local/lib/ruby/gems/1.8/gems/webrat-0.3.4/lib/webrat/rails.rb:88:in
send'
/usr/local/lib/ruby/gems/1.8/gems/webrat-0.3.4/lib/webrat/rails.rb:88:in
method_missing'
/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.3.0/lib/action_controller/integration.rb:553:in
__send__'
/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.3.0/lib/action_controller/integration.rb:553:in
method_missing'
./features/step_definitions/webrat_steps.rb:137:in Given /^I
login as cm$/'
features/plain/manage/image_select.feature:7:in
Given I login
as cm' When I edit a factsheet with id 1 #
features/step_definitions/webrat_steps.rb:155 When I click link
"Select Image" # features/step_definitions/webrat_steps.rb:89
e>
Adding merb as a dependency in config/environment.rb then trying to run things inevitably leads to a TypeError issuing out of csv.rb:
/opt/local/lib/ruby/1.8/csv.rb:26: superclass mismatch for class Row (TypeError) from /opt/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require' from /opt/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require' from /opt/local/lib/ruby/gems/1.8/gems/activesupport-2.3.0/lib/active_support/dependencies.rb:156:in `require' from /opt/local/lib/ruby/gems/1.8/gems/activesupport-2.3.0/lib/active_support/dependencies.rb:521:in `new_constants_in' from /opt/local/lib/ruby/gems/1.8/gems/activesupport-2.3.0/lib/active_support/dependencies.rb:156:in `require' from /opt/local/lib/ruby/gems/1.8/gems/activerecord-2.3.0/lib/active_record/fixtures.rb:3 from /opt/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require' from /opt/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require' from /opt/local/lib/ruby/gems/1.8/gems/activesupport-2.3.0/lib/active_support/dependencies.rb:156:in `require' from /opt/local/lib/ruby/gems/1.8/gems/activesupport-2.3.0/lib/active_support/dependencies.rb:521:in `new_constants_in' from /opt/local/lib/ruby/gems/1.8/gems/activesupport-2.3.0/lib/active_support/dependencies.rb:156:in `require' from /opt/local/lib/ruby/gems/1.8/gems/rails-2.3.0/lib/test_help.rb:13
Comments and changes to this ticket
-
Nicholas Faiz February 11th, 2009 @ 12:00 AM
Apologies for the poorly formatted stacktrace above. Here's a better version:
Given I login as cm # features/step_definitions/webrat_steps.rb:131 uninitialized constant Merb (NameError) /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.0/lib/active_support/dependencies.rb:443:in `load_missing_constant' /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.0/lib/active_support/dependencies.rb:80:in `const_missing' /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.0/lib/active_support/dependencies.rb:92:in `const_missing' /usr/local/lib/ruby/gems/1.8/gems/webrat-0.3.4/lib/webrat/core/field.rb:70:in `to_param' /usr/local/lib/ruby/gems/1.8/gems/webrat-0.3.4/lib/webrat/core/form.rb:83:in `params' /usr/local/lib/ruby/gems/1.8/gems/webrat-0.3.4/lib/webrat/core/form.rb:82:in `each' /usr/local/lib/ruby/gems/1.8/gems/webrat-0.3.4/lib/webrat/core/form.rb:82:in `params' /usr/local/lib/ruby/gems/1.8/gems/webrat-0.3.4/lib/webrat/core/form.rb:48:in `submit' /usr/local/lib/ruby/gems/1.8/gems/webrat-0.3.4/lib/webrat/core/field.rb:163:in `click' /usr/local/lib/ruby/gems/1.8/gems/webrat-0.3.4/lib/webrat/core/scope.rb:149:in `clicks_button' /usr/local/lib/ruby/gems/1.8/gems/webrat-0.3.4/lib/webrat/rails.rb:88:in `send' /usr/local/lib/ruby/gems/1.8/gems/webrat-0.3.4/lib/webrat/rails.rb:88:in `method_missing' /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.3.0/lib/action_controller/integration.rb:553:in `__send__' /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.3.0/lib/action_controller/integration.rb:553:in `method_missing'
-
Pratik March 7th, 2009 @ 07:36 PM
- State changed from new to invalid
Doesn't look relevant to Rails.
-
Nicholas Faiz March 7th, 2009 @ 11:58 PM
It issued from the Rails codebase. Another developer also saw the error.
Perhaps the problem has gone away now, I don't know, but immediately closing the ticket because it "doesn't look relevant" isn't looking into the problem. I would at least try to run a cucumber test without a merb gem installed in the system, or search for merb in the Rails codebase before I closed this.
-
CancelProfileIsBroken March 8th, 2009 @ 12:19 AM
- Rails full test suite runs fine with no merb on the system.
- I have multiple Rails apps deployed on servers with no merb and no problems.
- The only occurrence of the string "merb" in the Rails codebase is in a comment.
Net: If you're getting a merb error in your application running cucumber tests, then the issue is either in merb or your own code. Feel free to reopen if you can submit a failing test that shows an issue on pure rails.
-
Nicholas Faiz March 8th, 2009 @ 12:27 AM
Well, it's good that the issue has gone away.
But of us (two developers encountering this error on RC 1 in its first week) had to install the latest Merb gems to make Rails run. When we switched back 2.1.2 we no longer them.
Thanks for confirming it's no longer the case.
-
copperkray (at gmail) March 25th, 2009 @ 11:41 PM
- Tag set to actioncontroller, dependencies.rb
- Title changed from uninitialized constant Merb (NameError) to Encountered same problem, no resolution yet
Hi there - I've been encountering the same exact output:
/active_support/dependencies.rb:443:in `load_missing_constant'
I inherited this rails project with lots of 3rd party gem dependencies from another company, and I'm wondering if the issue is a result of updating to a more recent version of Rails. I'm stumped - Every controller call to ActiveController is triggering the same error tracing to the active_support/dependencies.rb file - what is the constant that it can't locate? any helpful suggestions would be much appreciated.
-
Pratik March 25th, 2009 @ 11:44 PM
- Title changed from Encountered same problem, no resolution yet to uninitialized constant Merb (NameError)
-
copperkray (at gmail) March 26th, 2009 @ 10:51 PM
- Title changed from uninitialized constant Merb (NameError) to uninitialized constant Merb ActionController
Ok - a little more information, cause I was stuck with this error awhile and couldn't figure out a solution. I thought it might have to do with sessions, or the boot.rb file - but nothing I did resolved the issue. Finally, inevitably, I rolled back the Rails version to 2.1.1, which solved the problem, what an idiot i smacked my forehead!!
But what is going on here? It seems important to figure out what is going on between v2.1 and v2.3 that is breaking every Controller call in the app.
-
Pratik March 26th, 2009 @ 10:55 PM
This is NOT Rails problem. But it's likely to be related to some 3rd party gem you're using.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
<h2 style="font-size: 14px">Tickets have moved to Github</h2>
The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>