[Locomotive-users] respond_to strangeness

Ryan Raaum ryan.raaum at gmail.com
Sat Sep 2 18:00:40 GMT 2006


Hi Steve,

On 9/2/06, Steve Odom <steve.odom at gmail.com> wrote:
>
> Hi, I'm using Locomotive with the 1.1.2 bundle and in the process of
> RESTifying my site.
>
> I'm having a strange problem and wonder if it is related to
> Locomotive somehow. because I'm out of troubleshooting ideas in
> rails. Part of my confusion is how whether I can run edge_rails
> stuff, or at least upgrade my vendor/rails directory and how that
> effects locomotive.


You should be able to run edge rails following the standard methods for
setting that up.  There shouldn't be any particular problems with doing that
in Locomotive.

Looking at your trace, I don't know that I have anything stunning to offer.
Maybe cut out your benchmarking code as it seems like that is throwing some
errors.

Also, I have no idea if there are any issues with lighttpd/fastcgi and any
of these issues; you could try adding a line with "server = mongrel" in your
config/locomotive.yml file to see if switching to mongrel changes anything.

Best,

-r

Here is my problem..
>
> In my controller if I have something like....
>
> def show
> @question = Question.find(2)
> end
>
> It displays my show.rhtml file with no problems.
>
> If I add respond_to like....
>
> def show
> @question = Question.find(2)
> respond_to do |type|
>    type.html
>    type.js
>    type.xml { render :xml => @question.to_xml }
>   end
>
>
> ..then it starts throwing a "No rhtml, rxml, rjs or delegate template
> found for questions/show.rhtml" Despite the fact that my show.rhtml
> file is there.
>
> But it will successfully show questions/2.xml in xml format.
>
> I can get the html to work if I change the type.html line to:
> type.html { render :action => 'show'}, but I shouldn't have to do that.
>
> The complete error log it generates is:
> No rhtml, rxml, rjs or delegate template found for questions/
> show.rhtml in /Users/steveodom/Documents/trivionomy/trunk/app/views
>
> RAILS_ROOT: /Users/steveodom/Documents/trivionomy/trunk/public/../
> config/..
> Application Trace | Framework Trace | Full Trace
>
> #{RAILS_ROOT}/vendor/rails/actionpack/lib/action_view/base.rb:390:in
> `find_template_extension_for'
> #{RAILS_ROOT}/vendor/rails/actionpack/lib/action_view/base.rb:324:in
> `pick_template_extension'
> #{RAILS_ROOT}/vendor/plugins/trunk/lib/globalize/rails/action_view.rb:
> 29:in `locate_globalize_path'
> #{RAILS_ROOT}/vendor/plugins/trunk/lib/globalize/rails/action_view.rb:
> 10:in `render_file'
> #{RAILS_ROOT}/vendor/rails/actionpack/lib/action_controller/base.rb:
> 747:in `render_file'
> #{RAILS_ROOT}/vendor/rails/actionpack/lib/action_controller/base.rb:
> 669:in `render_with_no_layout'
> #{RAILS_ROOT}/vendor/rails/actionpack/lib/action_controller/base.rb:
> 790:in `render_without_layout'
> #{RAILS_ROOT}/vendor/rails/actionpack/lib/action_controller/base.rb:
> 739:in `render_action'
> #{RAILS_ROOT}/vendor/rails/actionpack/lib/action_controller/base.rb:
> 691:in `render_with_no_layout'
> #{RAILS_ROOT}/vendor/rails/actionpack/lib/action_controller/layout.rb:
> 244:in `render_without_benchmark'
> #{RAILS_ROOT}/vendor/rails/actionpack/lib/action_controller/
> benchmarking.rb:50:in `render'
> /Applications/Locomotive2/Bundles/rails112.locobundle/i386/lib/ruby/
> 1.8/benchmark.rb:293:in `measure'
> #{RAILS_ROOT}/vendor/rails/actionpack/lib/action_controller/
> benchmarking.rb:50:in `render'
> #{RAILS_ROOT}/app/controllers/questions_controller.rb:69:in `show'
> #{RAILS_ROOT}/app/controllers/questions_controller.rb:69:in `show'
>
> #{RAILS_ROOT}/vendor/rails/actionpack/lib/action_view/base.rb:390:in
> `find_template_extension_for'
> #{RAILS_ROOT}/vendor/rails/actionpack/lib/action_view/base.rb:324:in
> `pick_template_extension'
> #{RAILS_ROOT}/vendor/plugins/trunk/lib/globalize/rails/action_view.rb:
> 29:in `locate_globalize_path'
> #{RAILS_ROOT}/vendor/plugins/trunk/lib/globalize/rails/action_view.rb:
> 10:in `render_file'
> #{RAILS_ROOT}/vendor/rails/actionpack/lib/action_controller/base.rb:
> 747:in `render_file'
> #{RAILS_ROOT}/vendor/rails/actionpack/lib/action_controller/base.rb:
> 669:in `render_with_no_layout'
> #{RAILS_ROOT}/vendor/rails/actionpack/lib/action_controller/base.rb:
> 790:in `render_without_layout'
> #{RAILS_ROOT}/vendor/rails/actionpack/lib/action_controller/base.rb:
> 739:in `render_action'
> #{RAILS_ROOT}/vendor/rails/actionpack/lib/action_controller/base.rb:
> 691:in `render_with_no_layout'
> #{RAILS_ROOT}/vendor/rails/actionpack/lib/action_controller/layout.rb:
> 244:in `render_without_benchmark'
> #{RAILS_ROOT}/vendor/rails/actionpack/lib/action_controller/
> benchmarking.rb:50:in `render'
> /Applications/Locomotive2/Bundles/rails112.locobundle/i386/lib/ruby/
> 1.8/benchmark.rb:293:in `measure'
> #{RAILS_ROOT}/vendor/rails/actionpack/lib/action_controller/
> benchmarking.rb:50:in `render'
> #{RAILS_ROOT}/vendor/rails/actionpack/lib/action_controller/
> mime_responds.rb:164:in `respond'
> #{RAILS_ROOT}/vendor/rails/actionpack/lib/action_controller/
> mime_responds.rb:158:in `respond'
> #{RAILS_ROOT}/vendor/rails/actionpack/lib/action_controller/
> mime_responds.rb:106:in `respond_to'
> #{RAILS_ROOT}/vendor/rails/actionpack/lib/action_controller/base.rb:
> 982:in `perform_action_without_filters'
> #{RAILS_ROOT}/vendor/rails/actionpack/lib/action_controller/
> filters.rb:363:in `perform_action_without_benchmark'
> #{RAILS_ROOT}/vendor/rails/actionpack/lib/action_controller/
> benchmarking.rb:66:in `perform_action_without_rescue'
> /Applications/Locomotive2/Bundles/rails112.locobundle/i386/lib/ruby/
> 1.8/benchmark.rb:293:in `measure'
> #{RAILS_ROOT}/vendor/rails/actionpack/lib/action_controller/
> benchmarking.rb:66:in `perform_action_without_rescue'
> #{RAILS_ROOT}/vendor/rails/actionpack/lib/action_controller/rescue.rb:
> 80:in `perform_action'
> #{RAILS_ROOT}/vendor/rails/actionpack/lib/action_controller/base.rb:
> 410:in `process_without_filters'
> #{RAILS_ROOT}/vendor/rails/actionpack/lib/action_controller/
> filters.rb:372:in `process_without_session_management_support'
> #{RAILS_ROOT}/vendor/rails/actionpack/lib/action_controller/
> session_management.rb:114:in `process'
> #{RAILS_ROOT}/vendor/rails/actionpack/lib/action_controller/base.rb:
> 321:in `process'
> #{RAILS_ROOT}/vendor/rails/railties/lib/dispatcher.rb:41:in `dispatch'
> #{RAILS_ROOT}/vendor/rails/railties/lib/fcgi_handler.rb:150:in
> `process_request'
> #{RAILS_ROOT}/vendor/rails/railties/lib/fcgi_handler.rb:54:in `process!'
> /Applications/Locomotive2/Bundles/rails112.locobundle/i386/lib/ruby/
> gems/1.8/gems/fcgi-0.8.6.1/fcgi.rb:600:in `each_cgi'
> /Applications/Locomotive2/Bundles/rails112.locobundle/i386/lib/ruby/
> gems/1.8/gems/fcgi-0.8.6.1/fcgi.rb:597:in `each_cgi'
> #{RAILS_ROOT}/vendor/rails/railties/lib/fcgi_handler.rb:53:in `process!'
> #{RAILS_ROOT}/vendor/rails/railties/lib/fcgi_handler.rb:23:in `process!'
> /Users/steveodom/Documents/trivionomy/trunk/public/dispatch.fcgi:24
>
> I've got a windows machine I could set up to run rails to see if it
> works outside of locomotive, but I'd like to not do that if I don't
> have to.
>
> Thanks,
>
> Steve Odom
> _______________________________________________
> Locomotive-users mailing list
> Locomotive-users at lists.raaum.org
> http://lists.raaum.org/mailman/listinfo/locomotive-users
>



-- 
Ryan Raaum
http://raaum.org
http://locomotive.raaum.org -- Self contained one-click Rails for Mac OS X
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://one.textdrive.com/pipermail/locomotive-users/attachments/20060902/599f67b8/attachment.htm


More information about the Locomotive-users mailing list