While migrating our servers to brand new spanking Ubuntu machines, I installed everything, but can't get Rails to work.
I have the feeling it has to do with Apache2 itself, so hereby my apache config file for this vhost.
<Directory /var/www/djtrx/public/>
Options ExecCGI FollowSymLinks
AddHandler cgi-script .fcgi
AllowOverride all
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
When I browse to the ip-address of the server, all I get is a directory-listing of my /var/www dir. This is obviously not right, but for now I'm stuck, can't find what I'm looking for.
After further investigating, I came up with some more weirdness. When I run dispatch.fcgi from the command-line, I get the following error in my production.log:
Some more info:
uname -a
Linux goserve-20061124 2.6.15-23-server #1 SMP Tue May 23 15:10:35 UTC 2006 i686 GNU/Linux
ruby -v
ruby 1.8.4 (2005-12-24) [i486-linux]
rails -v
Rails 1.2.2
Some more info:
uname -a
Linux goserve-20061124 2.6.15-23-server #1 SMP Tue May 23 15:10:35
UTC 2006 i686 GNU/Linux
ruby -v
ruby 1.8.4 (2005-12-24) [i486-linux]
rails -v
Rails 1.2.2
But now I'm even more stuck.....
I'm guessing Ubuntu Dapper Drake.
I'd recompile the latest version of ruby 1.8.5 and install it. Don't
use the apt-get version, uninstall if you are.
My blog has some hints on this: I am going to update it for Edgy Eft,
eventually.
I manually/apt-get remove all RoR related fluff, and recompiled ruby from source, renewed my rubygems installation, etc etc.
When I create a testapp, and run ruby public/dispatch.fcgi, the following error occures:
You have a nil object when you didn’t expect it!
The error occured while evaluating nil.downcase^M
/usr/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/request.rb:18:in method'^M /usr/lib/ruby/gems/1.8/gems/actionpack- 1.12.5/lib/action_controller/base.rb:933:in log_processing’^M
/usr/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/base.rb:407:in process_without_filters'^M /usr/lib/ruby/gems/1.8/gems/actionpack- 1.12.5/lib/action_controller/filters.rb:377:in process_without_session_management_support’^M
/usr/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/session_management.rb:117:in process'^M /usr/lib/ruby/gems/1.8/gems/rails- 1.1.6/lib/dispatcher.rb:38:in dispatch’^M
/usr/lib/ruby/gems/1.8/gems/rails-1.1.6/lib/fcgi_handler.rb:150:in process_request'^M /usr/lib/ruby/gems/1.8/gems/rails-1.1.6/lib/fcgi_handler.rb:54:in process!'^M
I am am getting the nil.downcase error as well, although on Rails 1.2.
Although when mine occurs it isn't starting from Apache/FCGI. Have you
tried the app with Mongrel or Webbrick?
I'm planning to have my site up and running publicly (virtual server at
BlueHost).
So far I've been developing on windows using Instant Rails. But now I'll
have to use Apache and Linux (no Mongrel on BlueHost :-P) so I need to
practice to avoid spending days to setup the public one.
I'm using now Ubuntu 7.10 (on WMware Player). And I think I get the same
problems as you guys. Has anyone found a solution?
Here's my symptoms:
When creating a test application and running it with WEbrick I get the
next error:
You have a nil object when you didn't expect it!
The error occurred while evaluating nil.to_sym
ActionController::Routing::Routes.draw do |map|
map.resources :coches
map.connect ':controller/:action/:id'
map.connect ':controller/:action/:id.:format'
end
[net note: don't put "Re:" on a Subject. Only a reply should have one.]
comopasta Gr wrote:
I'm using now Ubuntu 7.10 (on WMware Player).
Good! The more Ubuntu in your life, the better. And write unit tests for all your code. They help everything, including portability. You should have a batch of tests that pass in both Windows and Ubuntu.
But beyond that, I don't have an answer; just augmentations to your questions!
> And I think I get the same
problems as you guys. Has anyone found a solution?
Here's my symptoms:
When creating a test application and running it with WEbrick I get the next error:
You have a nil object when you didn't expect it!
The error occurred while evaluating nil.to_sym
ActionController::Routing::Routes.draw do |map|
map.resources :coches
map.connect ':controller/:action/:id'
map.connect ':controller/:action/:id.:format'
end
Is :id a magic thing that enforces an [:xdigit:] character class? Should - or shouldn't - that :id be like :filename?
Any compelling reason why you can't run Feisty or Gutsy? I ask only
because that's where my experience with Ubuntu and Rails begins...
either with a 7.10 server at work that is running in a VM, or on my own
7.04 desktop version running in VMware at home...
Any compelling reason why you can't run Feisty or Gutsy? I ask only
because that's where my experience with Ubuntu and Rails begins...
either with a 7.10 server at work that is running in a VM, or on my own
7.04 desktop version running in VMware at home...
and I haven't had any real issues like those of which you speak, and
most of my server setup is straight "sudo apt-get install blah blah"
Unfortunately, what I know about Apache will fit in a thimble, so I
won't be much help there.
I actually have Ubuntu server on its onw but I'm running something else
there and I wouldn't like to screw it up because my knwoledge about
Apache is low.
And actually on that server I didnt have any problems after the
installation was done.
I guess I should give it another try and start from scratch.
I'm not sure if my first message got posted or not.
I've run into this issue before with FastCGI. The problem for me was
that the at the top of dispatch.rb, dispatch.fcgi and dispatch.cgi was
the path to a Ruby installation specific to a Windows machine, because
that's where I was trying it out. However, the path is obviously very
different for Linux. Once I changed that path to point to where Ruby
was installed on that specific machine (in my case, /usr/bin/ruby),
the problem resolved itself.
So, make sure that your Rails app's above files point to where Ruby is
installed. Also, it wouldn't hurt if you had Ruby, RubyGems and Rails
versions and environments set in your shell's path.