I'm guessing you've run into an issue where Cucumber is calling "require 'treetop'" before the Rails stack is initialized (and thus before vendor/gems is loaded as a gem source). Adding treetop to your config.gem stuff may not help, but a full stack trace from both conditions (with config.gem 'treetop' and without) will be helpful.
--Matt Jones On Oct 15, 11:38 pm, Stephen Bannasch <[email protected]> wrote: > I've frozen all the gems used for testing my rails app into vendor/gems but > some of the dependent gems are loaded from > > Do I need to specify each gem in cucumber's dependency tree in the > environment initializer? > > config/environments/<env>.rb > > Right now I only use config.gem to specify these: > > cucumber, webrat, rspec, and rspec-rails > > Here are all the others cucumber depends on: > > $ RAILS_ENV=test rake gems > > ... > > - [F] cucumber >= 0.4.2 > - [F] term-ansicolor = 1.0.4 > - [F] treetop = 1.4.2 > - [F] polyglot >= 0.2.5 > - [F] polyglot = 0.2.9 > - [F] builder = 2.1.2 > - [F] diff-lcs = 1.1.2 > > I = Installed > F = Frozen > R = Framework (loaded before rails starts) > > So treetop is there but running: > > $ rake features --trace > > results in this error: > > undefined method `has_terminal?' for > #<Cucumber::Parser::I18n::EnglishParser> (NoMethodError) > > Presumably because cucumber is using an older gem version of treetop in my > system gem directory instead of > vendor/gems/treetop-1.4.2. > > Part of the trace: > > (eval):23:in `_nt_feature' > /Library/Ruby/Gems/1.8/gems/treetop-1.2.5/lib/treetop/runtime/compiled_pars > er.rb:18:in `send' > /Library/Ruby/Gems/1.8/gems/treetop-1.2.5/lib/treetop/runtime/compiled_pars > er.rb:18:in `parse' > /Users/stephen/dev/test/rites/vendor/gems/cucumber-0.4.2/bin/../lib/cucumbe > r/parser/treetop_ext.rb:28:in `parse_or_fail' --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---

