[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
Re: [PhillyOnRails] deploying to a shared host - cry for help
|
Not so sure about freezing rails, but based on your stack trace I highly
doubt that's the problem. It's a little difficult to track this down
without something to poke and prod, but I'd suggest you kill off all
your dispatch.fcgi processes, make sure they're down with a kill -9,
shut down apache, and go over all your configuration with a fine toothed
comb. More than likely there's a small mistake somewhere that is
causing the problem.
If all your configs look to be in order, try this environment
troubleshooting script from
http://wiki.rubyonrails.org/rails/pages/HowtoSetupApacheWithFastCGIAndRubyBindings:
*
*
*Troubleshooting Suggestions*
Make sure that you delete any ruby session files in your /tmp directory
before switching to dispatch.fcgi. If you tested with cgi, there might
be some with different permission that what apache (fastcgi) can read
and will cause issue.
If you want to see if fastcgi is working with ruby, try pasting the
following into test.fcgi (in your rails/public dir). You will need to
make sure the file has 755 permissions (chmod 755 test.fcgi).
|
#!/usr/local/bin/ruby
require 'cgi'
require 'rubygems'
require_gem 'fcgi'
FCGI.each_cgi do |cgi|
content = ''
env = []
cgi.env_table.each do |k,v|
env << [k,v]
end
env.sort!
env.each do |k,v|
content << %Q(#{k} => #{v}<br>\n)
end
cgi.out{content}
end
|
That will give you a dump of the environment supplied to ruby and it
might just be enough to figure out whats going wrong. Good luck.
Brian Donahue wrote:
Any ideas on how I can fix it? Also - shouldn't it be reading
action_controller from vendor/rails if I froze my gems? not
/usr/lib... ?
On 8/22/06, * Cliff Moon* <cliff@chariotsolutions.com
<mailto:cliff@chariotsolutions.com>> wrote:
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>
> <mailto: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>
> <mailto: 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
<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>
<mailto:talk@phillyonrails.org <mailto:talk@phillyonrails.org>>
> http://lists.phillyonrails.org/mailman/listinfo/talk
<http://lists.phillyonrails.org/mailman/listinfo/talk>
>
>
> _______________________________________________
> talk mailing list
> talk@phillyonrails.org <mailto:talk@phillyonrails.org>
<mailto: 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 <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
|
|