Feature #8919
Add support for Phusion Passenger RailsSpawnMethod smart
| Status: | New | Start date: | 2011-07-27 | |
|---|---|---|---|---|
| Priority: | Normal | Due date: | ||
| Assignee: | - | % Done: | 0% |
|
| Category: | Rails support | |||
| Target version: | - | |||
| Resolution: |
Description
Since redmine (or ruby?) is very slow to start up, it would be nice to enhance this, when using Phusion Passenger.
Passenger has directive RailsSpawnMethod, which, when set to "smart", drastically speeds up startup time of a rails app. Sadly, redmine cannot be used this way, since it is not compatible (?) with this startup type.
Specifically, it throws following error:
The application has exited during startup (i.e. during the evaluation of config/environment.rb). The error message can be found below. To solve this problem, please follow any instructions in the error message. Error message: Missing the i18n 0.4.2 gem. Please `gem install -v=0.4.2 i18n`
Attachment contains full backtrace.
History
#1 Updated by Kaspars Foigts 10 months ago
#2 Updated by Thomas Löber 10 months ago
Redmine 1.1 runs fine here with "RailsSpawnMethod smart".
Did you already install the i18n gem as mentioned in the error message?
#3 Updated by Kaspars Foigts 10 months ago
Yes, I did that.
$ svn info Path: . URL: http://redmine.rubyforge.org/svn/trunk Repository Root: http://redmine.rubyforge.org/svn Repository UUID: e93f8b46-1217-0410-a6f0-8f06a7374b81 Revision: 6398 Node Kind: directory Schedule: normal Last Changed Author: tmaruyama Last Changed Rev: 6398 Last Changed Date: 2011-08-02 16:24:10 +0300 (Tue, 02 Aug 2011) $ sudo gem install -v=0.4.1 i18n Successfully installed i18n-0.4.1 1 gem installed Installing ri documentation for i18n-0.4.1... Installing RDoc documentation for i18n-0.4.1... $ sudo service apache2 restart * Restarting web server apache2 ... waiting ...done.
Result is the same: Missing the i18n 0.4.2 gem. Please `gem install -v=0.4.2 i18n`
#4 Updated by Rui Andrada 10 months ago
Hi,
Why did you not used the suggested command line with the right version: `gem install -v=0.4.2 i18n`?
I hope it help you
Kaspars Foigts wrote:
Yes, I did that.
[...]
Result is the same:
Missing the i18n 0.4.2 gem. Please `gem install -v=0.4.2 i18n`
#5 Updated by Kaspars Foigts 10 months ago
Still no success.
laacz@zuze:~$ sudo gem install -v=0.4.2 i18n Successfully installed i18n-0.4.2 1 gem installed Installing ri documentation for i18n-0.4.2... Installing RDoc documentation for i18n-0.4.2... laacz@zuze:~$ sudo service apache2 reload * Reloading web server config apache2 ...done. laacz@zuze:~$
Missing the i18n 0.4.2 gem. Please `gem install -v=0.4.2 i18n`
#6 Updated by Jean-Baptiste Barth 10 months ago
Rails I18n loading has always been a bit messy, and I'm not sure you can have multiple versions of i18n at the same time in a gem environment (one more reason to use something like RVM). Maybe you could check you have only one version of the i18n gem in your GEM_PATH (you can first have a look at /var/lib/gems/1.8/gems if I read your output correctly).
#7 Updated by Thomas Löber 10 months ago
Do you use Ruby Enterprise? It comes with its own /usr/local/bin/gem.
So do the commands gem list and /usr/local/bin/gem list yield the same output?
#8 Updated by Kaspars Foigts 10 months ago
I don't use Ruby Enterprise. Did complete reinstall of related stuff. gems cleanup, installed debian's passenger with apt-get install libapache2-mod-passenger. It asked for -v 0.4.2 i18n, then -v 2.3.11 rails, then reconfigured apache, still the same error (now it only prints it to apaches' error_log).
Tried checking for 0.4.2 i18n gem from console:
laacz@zuze:~$ echo "require 'rubygems';gem 'i18n', '=0.4.2';"|ruby laacz@zuze:~$
App works OK, if I comment out RailsSpawnMethod smart in mod_passenger config. Also, if I start app via webrick, it also works.
That's why I believe, it's problem with smart spawn method support...