Closed kraudio closed 10 years ago
Can you post your gemfile please?
https://github.com/seyhunak/twitter-bootstrap-rails/pull/459 should be fixing this
The error is still here. I use TBS in the engine. All is good with TBS 2.1.3 but the error raises on 2.1.7 Also no problem in the new project with 2.1.7
rails g bootstrap:install
insert app/assets/javascripts/application.js
/Volumes/Storage/paul/.rvm/gems/ruby-1.9.3-p327@roles-ui/gems/railties-3.2.9/lib/rails.rb:46:in `configuration': undefined method `config' for nil:NilClass (NoMethodError)
from /Volumes/Storage/paul/.rvm/gems/ruby-1.9.3-p327@roles-ui/gems/twitter-bootstrap-rails-2.1.7/lib/generators/bootstrap/install/install_generator.rb:66:in `use_coffeescript?'
from /Volumes/Storage/paul/.rvm/gems/ruby-1.9.3-p327@roles-ui/gems/twitter-bootstrap-rails-2.1.7/lib/generators/bootstrap/install/install_generator.rb:35:in `add_bootstrap'
Hey,
It did work before https://github.com/seyhunak/twitter-bootstrap-rails/issues/409 , where the issue was introduced. Engine is in it's philosophy encapsulated, so it won't access Rails config of non-existing app and this is checked when installing. I personally see 2 options here:
module Bootstrap
module Generators
class InstallGenerator < ::Rails::Generators::Base
private
def use_coffeescript?
true
end
end
end
end
You could also create a new issue to support engines. I hope that helps :)
$ rails g bootstrap:install