Problem with rails g lazy_high_charts:install #91

Closed
bodagetta opened this Issue Nov 24, 2012 · 9 comments

Projects

None yet

5 participants

@bodagetta

I added gem

'lazy_high_charts' 

to my Gemfile then ran

bundle install

then tried

rails g lazy_high_charts:install

but got the following errors

[WARNING] Could not load generator "generators/lazy_high_charts/install/install_generator". Error: uninitialized constant LazyHighCharts::Rails::Generators.
/Users/Michael/.rvm/gems/ruby-1.9.3-p194/gems/lazy_high_charts-1.3.2/lib/generators/lazy_high_charts/install/install_generator.rb:4:in `<module:LazyHighCharts>'
/Users/Michael/.rvm/gems/ruby-1.9.3-p194/gems/lazy_high_charts-1.3.2/lib/generators/lazy_high_charts/install/install_generator.rb:3:in `<top (required)>'
/Users/Michael/.rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.8/lib/rails/generators.rb:300:in `block (2 levels) in lookup'
/Users/Michael/.rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.8/lib/rails/generators.rb:296:in `each'
/Users/Michael/.rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.8/lib/rails/generators.rb:296:in `block in lookup'
/Users/Michael/.rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.8/lib/rails/generators.rb:295:in `each'
/Users/Michael/.rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.8/lib/rails/generators.rb:295:in `lookup'
/Users/Michael/.rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.8/lib/rails/generators.rb:152:in `find_by_namespace'
/Users/Michael/.rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.8/lib/rails/generators.rb:169:in `invoke'
/Users/Michael/.rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.8/lib/rails/commands/generate.rb:12:in `<top (required)>'
/Users/Michael/.rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.8/lib/rails/commands.rb:29:in `<top (required)>'
script/rails:6:in `require'
script/rails:6:in `<main>'
Could not find generator lazy_high_charts:install.

I'm running Rails 3.2.8 and Ruby 1.9.3p194

@bodagetta

I discovered I just needed to add //= require highcharts and //= require exporting to app/assets/javascripts/application.js for rails version 3.1+

@bodagetta bodagetta closed this Nov 24, 2012
@Moosya
Moosya commented Dec 7, 2012

I tried adding the require statements as bodagetta mentioned above but it did not seem to help. Same stack trace. Using ruby-1.9.3-p125.

@xiaods
Collaborator
xiaods commented Dec 8, 2012

keep lazy_high_charts update to date, then have a try again.

@kshnurov
kshnurov commented Dec 9, 2012

Same problem. Ruby 1.9.3-p327, lazy_high_charts 1.3.2

[WARNING] Could not load generator "generators/lazy_high_charts/install/install_generator". Error: uninitialized constant LazyHighCharts::Rails::Generators.
/Users/kshnurov/.rvm/gems/ruby-1.9.3-p327/gems/lazy_high_charts-1.3.2/lib/generators/lazy_high_charts/install/install_generator.rb:4:in `<module:LazyHighCharts>'
/Users/kshnurov/.rvm/gems/ruby-1.9.3-p327/gems/lazy_high_charts-1.3.2/lib/generators/lazy_high_charts/install/install_generator.rb:3:in `<top (required)>'
/Users/kshnurov/.rvm/gems/ruby-1.9.3-p327/gems/railties-3.2.9/lib/rails/generators.rb:300:in `block (2 levels) in lookup'
/Users/kshnurov/.rvm/gems/ruby-1.9.3-p327/gems/railties-3.2.9/lib/rails/generators.rb:296:in `each'
/Users/kshnurov/.rvm/gems/ruby-1.9.3-p327/gems/railties-3.2.9/lib/rails/generators.rb:296:in `block in lookup'
/Users/kshnurov/.rvm/gems/ruby-1.9.3-p327/gems/railties-3.2.9/lib/rails/generators.rb:295:in `each'
/Users/kshnurov/.rvm/gems/ruby-1.9.3-p327/gems/railties-3.2.9/lib/rails/generators.rb:295:in `lookup'
/Users/kshnurov/.rvm/gems/ruby-1.9.3-p327/gems/railties-3.2.9/lib/rails/generators.rb:152:in `find_by_namespace'
/Users/kshnurov/.rvm/gems/ruby-1.9.3-p327/gems/railties-3.2.9/lib/rails/generators.rb:169:in `invoke'
/Users/kshnurov/.rvm/gems/ruby-1.9.3-p327/gems/railties-3.2.9/lib/rails/commands/generate.rb:12:in `<top (required)>'
/Users/kshnurov/.rvm/gems/ruby-1.9.3-p327/gems/railties-3.2.9/lib/rails/commands.rb:29:in `<top (required)>'
script/rails:6:in `require'
script/rails:6:in `<main>'
Could not find generator lazy_high_charts:install.
@xiaods xiaods reopened this Dec 10, 2012
@xiaods
Collaborator
xiaods commented Dec 10, 2012

@zx0 add

//= require highcharts 
//= require exporting 

to app/assets/javascripts/application.js for rails version 3.1+

have a look this tips.

@kshnurov

It didn't help.

@thoswarner

@zx0 if you're using Rails 3.1+ with the asset pipeline on, you don't need to run the generator - fails for me too, but works without running it.

From generators/lazy_high_charts/install/install_generator.rb => "You are using Rails 3.1+ with the asset pipeline enabled, so this generator is not needed."

@xiaods
Collaborator
xiaods commented Dec 13, 2012

any update?

@xiaods
Collaborator
xiaods commented Dec 17, 2012

according above conversation, seem it ok for overall case. close it.

@xiaods xiaods closed this Dec 17, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment