On 24 August 2010 15:10, Colin Law <[email protected]> wrote:
> On 24 August 2010 10:25, pravin mishra <[email protected]>
> wrote:
> > hi colin
> > I followed your instruction after that wen I am running my server then
> this
> > error is coming.....
> > here diligence is my project name
>
> Please don't top post, insert your reply at the appropriate place in
> the previous post. Another reader looking that this thread will ask
> what instructions you followed, if you had inserted your reply after
> my suggestions it would have been obvious.
>
> >
> >
> > C:\InstantRails-2.0-win_2\rails_apps\diligence>ruby script/server
> > => Booting Mongrel
> > => Rails 2.3.8 application starting on http://0.0.0.0:3000
> >
> C:/InstantRails-2.0-win_2/ruby/lib/ruby/gems/1.8/gems/rails-2.3.8/lib/initializer.rb:602:in
> > `send': undefined method `cache_template_extensions=' for
> > ActionView::Base:Cla
> > ss (NoMethodError)
>
> Google can be very useful for this sort of problem. I googled for
> undefined method cache_template_extensions
> and the first link was for this error occurring after an upgrade. The
> solution for him was to remove the line from
> config/environment/development.rb
>
> Colin
>
> --
> 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 [email protected].
> To unsubscribe from this group, send email to
> [email protected]<rubyonrails-talk%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/rubyonrails-talk?hl=en.
>
hello
my problem is not solved till now....
my configaration is like that
>>C:\InstantRails-2.0-win_2\rails_apps\pagination>gem list will_paginate
*** LOCAL GEMS ***
will_paginate (2.3.14)
C:\InstantRails-2.0-win_2\rails_apps\pagination>gem list ruby
*** LOCAL GEMS ***
rubygems-update (1.3.7, 1.0.1)
C:\InstantRails-2.0-win_2\rails_apps\pagination>gem list rails
*** LOCAL GEMS ***
rails (2.3.8, 2.0.2)
I had made a fresh project of name "pagination", table name is "lists" and
attributes is name & pin
>>CODE in lists_controller is below
def index
#...@lists = List.all
@lists = List.paginate :page => params[:page], :order => 'name DESC'
respond_to do |format|
format.html # index.html.erb
format.xml { render :xml => @lists }
end
>>CODE in MODELS list.rb is below
class List < ActiveRecord::Base
cattr_reader :per_page
@@per_page = 2
end
>>CODE in VIEWS index.html.erb is below
<h1>Listing lists</h1>
<table>
<tr>
<th>Name</th>
<th>Pin</th>
</tr>
<% @lists.each do |list| %>
<tr>
<td><%=h list.name %></td>
<td><%=h list.pin %></td>
<td><%= link_to 'Show', list %></td>
<td><%= link_to 'Edit', edit_list_path(list) %></td>
<td><%= link_to 'Destroy', list, :confirm => 'Are you sure?', :method =>
:delete %></td>
</tr>
<% end %>
</table>
<br />
<hr/>
<%= will_paginate @lists%>
<hr/>
<%= link_to 'New list', new_list_path %>
>> i had added in ENVIRNMENT.RB file
require 'will_paginate'
when i am running server then
C:\InstantRails-2.0-win_2\rails_apps\pagination>ruby script/server
=> Booting Mongrel
=> Rails 2.3.8 application starting on http://0.0.0.0:3000
=> Call with -d to detach
=> Ctrl-C to shutdown server
finally on browser error is coming this
undefined method `paginate' for #<Class:0x471c448>
RAILS_ROOT: C:/InstantRails-2.0-win_2/rails_apps/pagination
Application Trace <#> | Framework Trace <#> | Full Trace <#>
C:/InstantRails-2.0-win_2/ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.8/lib/active_record/base.rb:1994:in
`method_missing'
C:/InstantRails-2.0-win_2/rails_apps/pagination/app/controllers/lists_controller.rb:6:in
`index'
please help me
thanks
--
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 [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.