I installed this plugin http://github.com/loudpixel/highcharts-rails and I put this code in my controller: def panels @ui_panels = Highchart.pie({ :chart => { :renderTo => "pie-chart-container", :margin => [50, 30, 0, 30] }, :credits => { :enabled => true, :href => ''http://marketshare.hitslink.com/browser … px?qprid=3'', :text => ''Data provided by NETMARKETSHARE'' }, :plotOptions => { :pie => { :dataLabels => { :formatter => pie_label_formatter, :style => { :textShadow => ''#000000 1px 1px 2px'' } } } }, :series => [ { :type => ''pie'', :data => browser_data } ], :subtitle => { :text => ''January 2010'' }, :title => { :text => ''Browser Market Share'' }, :tooltip => { :formatter => pie_tooltip_formatter }, }) end Yet, I get this error: NameError in DashboardController#panels uninitialized constant DashboardController::Highchart Any suggestions? thanks. -- Posted via http://www.ruby-forum.com/. -- 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
> uninitialized constant DashboardController::Highchart > > Any suggestions? thanks.Are you able to go into the console and just type Highchart ? See if it''s actually getting loaded into your app. If so, have you tried using the scope operator :: in front of it? ~Jeremy -- Posted via http://www.ruby-forum.com/. -- 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Did you run the rake task after you installed the plugin? On Mar 31, 1:49 pm, John Merlino <li...-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote:> I installed this pluginhttp://github.com/loudpixel/highcharts-rails > and I put this code in my controller: > > def panels > @ui_panels = Highchart.pie({ > :chart => { > :renderTo => "pie-chart-container", > :margin => [50, 30, 0, 30] > }, > :credits => { > :enabled => true, > :href => ''http://marketshare.hitslink.com/browser… > px?qprid=3'', > :text => ''Data provided by NETMARKETSHARE'' > }, > :plotOptions => { > :pie => { > :dataLabels => { > :formatter => pie_label_formatter, > :style => { > :textShadow => ''#000000 1px 1px 2px'' > } > } > } > }, > :series => [ > { > :type => ''pie'', > :data => browser_data > } > ], > :subtitle => { > :text => ''January 2010'' > }, > :title => { > :text => ''Browser Market Share'' > }, > :tooltip => { > :formatter => pie_tooltip_formatter > }, > }) > > end > > Yet, I get this error: > NameError in DashboardController#panels > > uninitialized constant DashboardController::Highchart > > Any suggestions? thanks. > -- > Posted viahttp://www.ruby-forum.com/.-- 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
David wrote:> Did you run the rake task after you installed the plugin?Yeah, I ran rake highcharts_rails:install and then rake db:migrate in console, I get this:>> HighChartNameError: uninitialized constant HighChart from /Library/Ruby/Gems/1.8/gems/activesupport-2.3.4/lib/active_support/dependencies.rb:443:in `load_missing_constant'' from /Library/Ruby/Gems/1.8/gems/activesupport-2.3.4/lib/active_support/dependencies.rb:80:in `const_missing'' from /Library/Ruby/Gems/1.8/gems/activesupport-2.3.4/lib/active_support/dependencies.rb:92:in `const_missing'' from (irb):4 -- Posted via http://www.ruby-forum.com/. -- 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.