Never mind about the Google Charts gem.. I have it working now.. I was
trying in an unblessed app.. works great in my blessed app.

I still cant figure out why the will_paginate gem won't work

On Jun 3, 2:20 pm, Aaron <[EMAIL PROTECTED]> wrote:
> Hmm I am just not able to get gems working it seems.. I can't figure
> out what I am doing wrong. I wanted to play with the google charts
> gem, so I installed it, required it.. and here is my code for the
> controller:
>
> def index
> @chart = Gchart.line(  :size => '200x300',
>               :title => "example title",
>               :bg => 'efefef',
>               :legend => ['first data set label', 'second data set
> label'],
>               :data => [10, 30, 120, 45, 72])
> end
>
> in the view I have tried both the following:
>
> <%= image_tag chart %>
> and <%= chart %>
>
> No matter what I do I get the following errors..
>
>  LoadError in UseronesController#index
>
> Expected /mnt/home/userapps/19516/vendor/gems/gchart/lib/gchart.rb to
> define Gchart
>
> RAILS_ROOT: /mnt/home/userapps/19516
> Application Trace | Framework Trace | Full Trace
>
> /usr/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_support/
> dependencies.rb:249:in `load_missing_constant'
> /usr/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_support/
> dependencies.rb:453:in `const_missing'
> /usr/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_support/
> dependencies.rb:465:in `const_missing'
> /usr/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_support/
> dependencies.rb:260:in `load_missing_constant'
> /usr/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_support/
> dependencies.rb:469:in `const_missing'
> app/controllers/userones_controller.rb:14
> app/controllers/userones_controller.rb:9
> /home/userapps_plugins/request_timeout/lib/request_timeout.rb:7
> /home/userapps_plugins/request_timeout/lib/request_timeout.rb:6
> /usr/bin/mongrel_rails:19:in `load'
> /usr/bin/mongrel_rails:19
>
> On Jun 3, 10:48 am, Aaron <[EMAIL PROTECTED]> wrote:
>
> > At the moment I have taken out the pagination code and just have the
> > search code working .. you can see it at ngacogdirectory.heroku.com
> > (its very simple a at the moment)
>
> > On Jun 3, 10:42 am, Aaron <[EMAIL PROTECTED]> wrote:
>
> > > Yes I am trying the method used inhttp://railscasts.com/episodes/51
>
> > > Here are my models and controllers:
>
> > > # models/church.rb
> > > def self.search(search, page)
> > >   paginate :per_page => 5, :page => page,
> > >            :conditions => ['zipcode || city LIKE like ?', "%#{search}
> > > %"],
> > >            :order => 'name'
> > > end
>
> > > # churches_controller.rb
> > > def index
> > >   @churches = Church.search(params[:search], params[:page])
> > > end
>
> > > I am only trying this in Heroku, and it seems like the gem is
> > > installed (I installed it using Heroku). it shows up in my vendor/
> > > gems/ directory. I have tried requiring it at the bottom of my
> > > environment.rb file. I am at a loss at this point. Is there any other
> > > information I could give you that would help?
>
> > > On Jun 3, 9:19 am, mikong <[EMAIL PROTECTED]> wrote:
>
> > > > Hi Aaron,
>
> > > > Any more details you can give us? Have you made it work in your local
> > > > environment? Or are you only trying this out in Heroku?
>
> > > > Where are you calling paginate?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Heroku" group.
To post to this group, send email to heroku@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/heroku?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to