Gabriel Gabriel wrote:
> Marcin Seroczynski wrote:
>> You gotta set system enviroment var GEM_HOME pointing to Your gems
>> directory.
>>
>> I have accomplished it by adding Set Env in VirtualHost configuration.
>> It needs to have enabled mod_env in apache, by
>> $~/ sudo a2enmod env
>>
>> <VirtualHost *:80>
>> DocumentRoot /home/user/repos/rails_project/public
>> ServerName rails.local
>> ServerAlias *.rails.local
>>
>> RailsEnv development
>> RailsAllowModRewrite off
>> SetEnv GEM_HOME /home/user/rvm/gems/ruby-1.8.7-p249%rails2
>>
>> ErrorLog /var/log/apache2/error.log
>> CustomLog /var/log/apache2/access.log combined
>> <Directory /home/user/repos/rails_project/public>
>> AllowOverride all
>> Options -MultiViews
>> Order allow,deny
>> Allow from all
>> </Directory>
>> </VirtualHost>
>>
>> Another good point is to start using RVM (Ruby Version Manager),
>> http://rvm.beginrescueend.com/
>>
>> For You it would be:
>> SetEnv GEM_HOME /usr/local/lib/ruby/gems/1.8
>>
>> Best,
>> Martin
>
> Thank you very much ! I make a small foot forward. Now I have an html
> page displaying :
>
> Application error
> Rails application failed to start properly
>
> If I take a look in the error.log from apache, I've got :
>
> [Tue Feb 23 10:10:50 2010] [notice] Apache/2.2.8 (Ubuntu)
> Phusion_Passenger/2.2.10 PHP/5.2.4-2ubuntu5.7 with Suhosin-Patch
> configured -- resuming normal operations
> *** Passenger ERROR (ext/common/SpawnManager.h:232):
> Could not start the spawn server: /usr/bin/ruby1.8: No such file or
> directory (2)
> [ pid=28449 file=ext/apache2/Hooks.cpp:727 time=2010-02-23 10:10:55.952
> ]:
> Unexpected error in mod_passenger: Cannot spawn application
> '/opt/redmine': Could not write 'spawn_application' command to the spawn
> server: Broken pipe (32)
> Backtrace:
> in 'virtual boost::shared_ptr<Passenger::Application::Session>
> Passenger::ApplicationPoolServer::Client::get(const
> Passenger::PoolOptions&)' (ApplicationPoolServer.h:471)
> in 'int Hooks::handleRequest(request_rec*)' (Hooks.cpp:523)
>
> [Tue Feb 23 10:10:58 2010] [error] [client 192.168.60.11] File does not
> exist: /var/www/favicon.ico
>
>
> Looks, we had a write permission issue ? and why the hell, he's trying
> to load /var/www/favicon.ico, he should look into opt/redmine instead...
>
> Thanks a lot again !
Here is my /etc/apache2/sites-available/default :
<VirtualHost *:80>
ServerAdmin webmas...@localhost
ServerName localhost
DocumentRoot /var/www
RailsEnv production
RailsBaseURI /redmine
SetEnv GEM_HOME /usr/local/lib/ruby/gems/1.8
<Directory /opt/redmine/public/>
Options FollowSymLinks
AllowOverride None
Order deny,allow
Allow from all
</Directory>
ErrorLog /var/log/apache2/error.log
LogLevel warn
CustomLog /var/log/apache2/access.log combined
</VirtualHost>
Thanks again !
--
Posted via http://www.ruby-forum.com/.
--
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.