Cliff Moon on 22 Aug 2006 15:57:21 -0000


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: [PhillyOnRails] deploying to a shared host - cry for help


Looks like either apache or fastCGI isn't supplying rails with the appropriate environment variables.

Brian Donahue wrote:
Sorry for not including this earlier - here is the stack trace:

# Logfile created on Sun Aug 20 12:30:12 EDT 2006 by logger.rb/1.5.2.7
undefined method `downcase' for nil:NilClass
/usr/lib/ruby/gems/1.8/gems/actionpack- 1.12.5/lib/action_controller/request.rb:18:in `method'
/usr/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/base.rb:933:in `log_processing'
/usr/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/base.rb:407:in `process_without_filters'
/usr/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/filters.rb:377:in `process_without_session_management_support'
/usr/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/session_management.rb:117:in `process'
/usr/lib/ruby/gems/1.8/gems/rails-1.1.6/lib/dispatcher.rb:38:in `dispatch'
dispatch.rb:10
undefined method `downcase' for nil:NilClass
/usr/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/request.rb:18:in `method'
/usr/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/base.rb:933:in `log_processing'
/usr/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/base.rb:407:in `process_without_filters'
/usr/lib/ruby/gems/1.8/gems/actionpack- 1.12.5/lib/action_controller/filters.rb:377:in `process_without_session_management_support'
/usr/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/session_management.rb:117:in `process'
/usr/lib/ruby/gems/1.8/gems/rails- 1.1.6/lib/dispatcher.rb:38:in `dispatch'
./dispatch.cgi:10





On 8/22/06, *Brian Donahue* <stuff@pigeonmoon.com <mailto:stuff@pigeonmoon.com>> wrote:


Aaron, thanks for the suggestions. This is happening on any page
I try to hit. When I run "ruby script/server -e production" - it
runs fine on port 3000 of my host. The data is there... and the
site works fine. I'm not sure why it wouldn't find it when
running via fastCGI.




    On 8/22/06, *Aaron Blohowiak* < aaron@aaronblohowiak.com
    <mailto:aaron@aaronblohowiak.com>> wrote:

        Did you upload your data in addition to your app?

        The error suggests that you are calling nil.downcase

        With any debugging the real question is  "What assumption have
        you made that hasn't been fulfilled?"

        In this case, i will assume that you meant to call downcase on
        a string. However, your variable is not a string, it's nil.

        Common reasons for this: no records found in an ActiveRecord
        find() statement, empty value in your DB row, et cetera.

Techniques for tracking it down:

        use script/console on the server, then go through and
        approximate what should be happening during that request at
        the command line, checking your variable's state as you go
        through.

        Alternately, you can put in logger.info() calls which will log
        in production if it is only happening in prod.

        Also, check out breakpointer.

        Personally, I prefer the console.
        Aaron Blohowiak

        On Aug 22, 2006, at 11:00 AM, Brian Donahue wrote:

        OK.  I will try to make a long story short.  I took on a
        freebie gig for one of my favorite musicians, Eric Bachmann
        (Crooked Fingers, Archers of Loaf, and now a solo record).  I
        wanted to do it in Rails for fun, and because of quick and
        simple content management I could throw together with little
        more than scaffolding.  Got it all working locally on my
        machines.  Recommended Site5 to them for hosting, got it
        loaded up there.  Followed the instructions for deployment on
        site5's forums:

          1.


New user's guide to freezing a Ruby on Rails application - Site5 Web Hosting Forums <http://forums.site5.com/showthread.php?t=10625>

          2.


HowToInstallOnSite5 in Ruby on Rails <http://wiki.rubyonrails.com/rails/pages/HowToInstallOnSite5>


3.


[HOW TO] Install a RubyOnRails app on a Site5 account - Site5 Web Hosting Forums <http://forums.site5.com/showthread.php?t=4406>

        I continue to get


Bad Request

        Your browser sent a request that this server could not understand.

        The production log tells me
        undefined *method* '*downcase *' for nil:NilClass

I can provide the whole stack trace if anyone's interested. I
had been getting some support from Site5, but they seem to
have stopped responding, even to a newly entered ticket with
"urgent" status (submitted last night). They seemed to think
it had to do with different versions of rails, so I froze my
gems and uploaded them and am still having issues. If I run
webrick via SSH I can connect on port 3000, so this seems to
be an apache/fastcgi issue.


        Does anyone have any advice?

        Thanks!

        Brian



        _______________________________________________
        talk mailing list
        talk@phillyonrails.org <mailto:talk@phillyonrails.org>
        http://lists.phillyonrails.org/mailman/listinfo/talk


_______________________________________________ talk mailing list talk@phillyonrails.org <mailto:talk@phillyonrails.org> http://lists.phillyonrails.org/mailman/listinfo/talk




------------------------------------------------------------------------

_______________________________________________
talk mailing list
talk@phillyonrails.org
http://lists.phillyonrails.org/mailman/listinfo/talk

_______________________________________________ talk mailing list talk@phillyonrails.org http://lists.phillyonrails.org/mailman/listinfo/talk