Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem running bundle console with 'gettext_i18n_rails' in Gemfile #16

Closed
a1exsh opened this issue Nov 20, 2010 · 4 comments
Closed

Problem running bundle console with 'gettext_i18n_rails' in Gemfile #16

a1exsh opened this issue Nov 20, 2010 · 4 comments

Comments

@a1exsh
Copy link

a1exsh commented Nov 20, 2010

In an brand-new Rails app from scratch (rails new .) with a Gemfile as simple as:

source 'http://rubygems.org'
gem 'rails', '3.0.3'
gem 'gettext_i18n_rails'

I get this stack when trying to run bundle console:

/usr/lib/ruby/gems/1.8/gems/gettext_i18n_rails-0.2.11/lib/gettext_i18n_rails/action_controller.rb:1: uninitialized constant ActionController (NameError)
from /usr/lib/ruby/gems/1.8/gems/gettext_i18n_rails-0.2.11/lib/gettext_i18n_rails.rb:26:in require' from /usr/lib/ruby/gems/1.8/gems/gettext_i18n_rails-0.2.11/lib/gettext_i18n_rails.rb:26 from /usr/lib/ruby/gems/1.8/gems/bundler-1.0.7/lib/bundler/runtime.rb:64:inrequire'
from /usr/lib/ruby/gems/1.8/gems/bundler-1.0.7/lib/bundler/runtime.rb:64:in require' from /usr/lib/ruby/gems/1.8/gems/bundler-1.0.7/lib/bundler/runtime.rb:62:ineach'
from /usr/lib/ruby/gems/1.8/gems/bundler-1.0.7/lib/bundler/runtime.rb:62:in require' from /usr/lib/ruby/gems/1.8/gems/bundler-1.0.7/lib/bundler/runtime.rb:51:ineach'
from /usr/lib/ruby/gems/1.8/gems/bundler-1.0.7/lib/bundler/runtime.rb:51:in require' from /usr/lib/ruby/gems/1.8/gems/bundler-1.0.7/lib/bundler.rb:112:inrequire'
from /usr/lib/ruby/gems/1.8/gems/bundler-1.0.7/lib/bundler/cli.rb:434:in console' from /usr/lib/ruby/gems/1.8/gems/bundler-1.0.7/lib/bundler/vendor/thor/task.rb:22:insend'
from /usr/lib/ruby/gems/1.8/gems/bundler-1.0.7/lib/bundler/vendor/thor/task.rb:22:in run' from /usr/lib/ruby/gems/1.8/gems/bundler-1.0.7/lib/bundler/vendor/thor/invocation.rb:118:ininvoke_task'
from /usr/lib/ruby/gems/1.8/gems/bundler-1.0.7/lib/bundler/vendor/thor.rb:246:in dispatch' from /usr/lib/ruby/gems/1.8/gems/bundler-1.0.7/lib/bundler/vendor/thor/base.rb:389:instart'
from /usr/lib/ruby/gems/1.8/gems/bundler-1.0.7/bin/bundle:13
from /usr/bin/bundle:19:in `load'
from /usr/bin/bundle:19

Is this a gettext_i18n_rails, rails, bundler or rubygems problem? Where do I look to find out?

Note: did a gem update after getting this problem, but nothing changed.

@grosser
Copy link
Owner

grosser commented Nov 20, 2010

Seems to me like gettext_i18n_rails expects action_controller to be loaded.
bundle exec rails c should work.

@a1exsh
Copy link
Author

a1exsh commented Nov 20, 2010

It works indeed. But shouldn't bundle console also work no matter which gems I use in Gemfile?

@grosser
Copy link
Owner

grosser commented Nov 20, 2010

gettext_i18n_rails is a 'works with rails' gem, so it assumes rails is there when its started, so bundle console is kind of a weird edge-case where rails is loaded but not rails app is there ...

This Gemfile works with 0.2.12 (just released):

source 'http://rubygems.org'
gem 'rails'
gem 'i18n'
gem 'activesupport'
gem 'gettext_i18n_rails'

@a1exsh
Copy link
Author

a1exsh commented Nov 20, 2010

Thanks, that fixes the problem. :)

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants