[Cucumber:4048] Rails 3 private method `require' called for Bundler:Module (NoMethodError)

381 views
Skip to first unread message

Mikel Lindsaar

unread,
Apr 16, 2010, 3:39:31 AM4/16/10
to cu...@googlegroups.com
Hi all,

getting the following (weird) error on startup, looks like treetop is over writing require and crashing out bundler.

Anyone have similar problems? Valid part of the Gemfile is:

gem 'capybara', :git => 'git://github.com/jnicklas/capybara.git'
gem 'database_cleaner', :git => 'git://github.com/bmabey/database_cleaner.git'
gem 'cucumber-rails', :git => 'git://github.com/aslakhellesoy/cucumber-rails.git'
gem "cucumber", :git => "git://github.com/aslakhellesoy/cucumber.git"


Mikel



mikel@baci ~/Code/app
$ rake cucumber

/Users/mikel/.rvm/rubies/ruby-1.8.7-p249/bin/ruby -I "/Users/mikel/.rvm/gems/ruby-1.8.7-p249@app/bundler/gems/cucumber-3eb3f1a09813a1271fada66aac31d953ef2ad625-master/lib:lib" "/Users/mikel/.rvm/gems/ruby-1.8.7-p249@app/bundler/gems/cucumber-3eb3f1a09813a1271fada66aac31d953ef2ad625-master/bin/cucumber" --profile default
Using the default profile...
private method `require' called for Bundler:Module (NoMethodError)
/Users/mikel/Code/app/config/application.rb:6
/Users/mikel/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
/Users/mikel/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `polyglot_original_require'
/Users/mikel/.rvm/gems/ruby-1.8.7-p249@app/gems/polyglot-0.3.1/lib/polyglot.rb:64:in `require'
/Users/mikel/Code/app/config/environment.rb:2
/Users/mikel/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
/Users/mikel/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `polyglot_original_require'
/Users/mikel/.rvm/gems/ruby-1.8.7-p249@app/gems/polyglot-0.3.1/lib/polyglot.rb:64:in `require'
/Users/mikel/Code/app/features/support/env.rb:8
/Users/mikel/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
/Users/mikel/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `polyglot_original_require'
/Users/mikel/.rvm/gems/ruby-1.8.7-p249@app/gems/polyglot-0.3.1/lib/polyglot.rb:64:in `require'
/Users/mikel/.rvm/gems/ruby-1.8.7-p249@app/bundler/gems/cucumber-3eb3f1a09813a1271fada66aac31d953ef2ad625-master/bin/../lib/cucumber/rb_support/rb_language.rb:124:in `load_code_file'
/Users/mikel/.rvm/gems/ruby-1.8.7-p249@app/bundler/gems/cucumber-3eb3f1a09813a1271fada66aac31d953ef2ad625-master/bin/../lib/cucumber/step_mother.rb:85:in `load_code_file'
/Users/mikel/.rvm/gems/ruby-1.8.7-p249@app/bundler/gems/cucumber-3eb3f1a09813a1271fada66aac31d953ef2ad625-master/bin/../lib/cucumber/step_mother.rb:77:in `load_code_files'
/Users/mikel/.rvm/gems/ruby-1.8.7-p249@app/bundler/gems/cucumber-3eb3f1a09813a1271fada66aac31d953ef2ad625-master/bin/../lib/cucumber/step_mother.rb:76:in `each'
/Users/mikel/.rvm/gems/ruby-1.8.7-p249@app/bundler/gems/cucumber-3eb3f1a09813a1271fada66aac31d953ef2ad625-master/bin/../lib/cucumber/step_mother.rb:76:in `load_code_files'
/Users/mikel/.rvm/gems/ruby-1.8.7-p249@app/bundler/gems/cucumber-3eb3f1a09813a1271fada66aac31d953ef2ad625-master/bin/../lib/cucumber/cli/main.rb:48:in `execute!'
/Users/mikel/.rvm/gems/ruby-1.8.7-p249@app/bundler/gems/cucumber-3eb3f1a09813a1271fada66aac31d953ef2ad625-master/bin/../lib/cucumber/cli/main.rb:20:in `execute'
/Users/mikel/.rvm/gems/ruby-1.8.7-p249@app/bundler/gems/cucumber-3eb3f1a09813a1271fada66aac31d953ef2ad625-master/bin/cucumber:8
rake aborted!
Command failed with status (1): [/Users/mikel/.rvm/rubies/ruby-1.8.7-p249/b...]

(See full trace by running task with --trace)

--
You received this message because you are subscribed to the Google Groups "Cukes" group.
To post to this group, send email to cu...@googlegroups.com.
To unsubscribe from this group, send email to cukes+un...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/cukes?hl=en.

aslak hellesoy

unread,
Apr 16, 2010, 4:35:18 AM4/16/10
to cu...@googlegroups.com
On Fri, Apr 16, 2010 at 9:39 AM, Mikel Lindsaar <raas...@gmail.com> wrote:
> Hi all,
>
> getting the following (weird) error on startup, looks like treetop is over writing require and crashing out bundler.
>

It's Treetop's dependency Polyglot that redefines Kernel.require.

When cucumber 0.7 is out there will be no more Treetop/Polyglot, but
that's probably a few weeks in the future.

Aslak

Mikel Lindsaar

unread,
Apr 16, 2010, 4:56:00 AM4/16/10
to cu...@googlegroups.com
On 16, April 2010, at 16 Apr 18:35, aslak hellesoy wrote:
> It's Treetop's dependency Polyglot that redefines Kernel.require.
>
> When cucumber 0.7 is out there will be no more Treetop/Polyglot, but
> that's probably a few weeks in the future.

I figured...

Jeremy and I were working on cleaning this up in Mail, as I had the same problem.

Anyway, what are you replacing treetop with, out of interest?

Mikel

Mikel Lindsaar

unread,
Apr 16, 2010, 4:59:07 AM4/16/10
to cu...@googlegroups.com
On 16, April 2010, at 16 Apr 18:35, aslak hellesoy wrote:
> It's Treetop's dependency Polyglot that redefines Kernel.require.

Just for anyone who runs into the same problem...

A hack way to fix it is just edit "gems/treetop-1.4.5/lib/treetop.rb" and comment out require 'treetop/polyglot' like so:

require 'treetop/runtime'
require 'treetop/compiler'
#require 'treetop/polyglot'

Regards

Mikel

aslak hellesoy

unread,
Apr 16, 2010, 5:05:50 AM4/16/10
to cu...@googlegroups.com
On Fri, Apr 16, 2010 at 10:56 AM, Mikel Lindsaar <raas...@gmail.com> wrote:
> On 16, April 2010, at 16 Apr 18:35, aslak hellesoy wrote:
>> It's Treetop's dependency Polyglot that redefines Kernel.require.
>>
>> When cucumber 0.7 is out there will be no more Treetop/Polyglot, but
>> that's probably a few weeks in the future.
>
> I figured...
>
> Jeremy and I were working on cleaning this up in Mail, as I had the same problem.
>
> Anyway, what are you replacing treetop with, out of interest?
>

Ragel. http://wiki.github.com/aslakhellesoy/gherkin/

Aslak
Reply all
Reply to author
Forward
0 new messages