RAILS_ENV=YOUR_ENVIRONMENT script/about error but redmine with webrick runs fine.
Added by Maple Tree about 14 years ago
I had followed several google links to install redmine,ruby, and rail.
I am able to run redmine with Webrick (ruby script/server webrick -e production)
=> Booting WEBrick
=> Rails 2.3.5 application starting on http://0.0.0.0:3000
./script/../config/../vendor/rails/railties/lib/rails/gem_dependency.rb:119:Warning: Gem::Dependency#version_requirements is deprecated and will be removed on or after August 2010. Use #requirement
=> Call with -d to detach
=> Ctrl-C to shutdown server
[2010-07-22 22:56:33] INFO WEBrick 1.3.1
[2010-07-22 22:56:33] INFO ruby 1.8.7 (2009-06-12) [x86_64-linux]
[2010-07-22 22:56:33] INFO WEBrick::HTTPServer#start: pid=26264 port=3000
[2010-07-22 22:57:21] INFO going to shutdown ...
[2010-07-22 22:57:21] INFO WEBrick::HTTPServer#start done.
When I run the following command, I get some error. Could you guys please help me.
RAILS_ENV=YOUR_ENVIRONMENT script/about
./script/../config/../vendor/rails/railties/lib/rails/gem_dependency.rb:119:Warning: Gem::Depende ncy#version_requirements is deprecated and will be removed on or after August 2010. Use #require ment
./script/../config/../vendor/rails/railties/lib/initializer.rb:386:in `read': No such file or dir ectory - /usr/local/redmine-0.9.4/config/environments/YOUR_ENVIRONMENT.rb (Errno::ENOENT)
from ./script/../config/../vendor/rails/railties/lib/initializer.rb:386:in `load_environm ent'
from /usr/local/redmine-0.9.4/vendor/rails/activesupport/lib/active_support/core_ext/kern el/reporting.rb:11:in `silence_warnings'
from ./script/../config/../vendor/rails/railties/lib/initializer.rb:379:in `load_environm ent'
from ./script/../config/../vendor/rails/railties/lib/initializer.rb:137:in `process'
from ./script/../config/../vendor/rails/railties/lib/initializer.rb:113:in `send'
from ./script/../config/../vendor/rails/railties/lib/initializer.rb:113:in `run'
from /usr/local/redmine-0.9.4/config/environment.rb:20
from /usr/local/ruby1.8.7//lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_o riginal_require'
from /usr/local/ruby1.8.7//lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `requi re'
from /usr/local/redmine-0.9.4/vendor/rails/railties/lib/commands/about.rb:1
from /usr/local/ruby1.8.7//lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_o riginal_require'
from /usr/local/ruby1.8.7//lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `requi re'
from script/about:4
Replies (4)
RE: RAILS_ENV=YOUR_ENVIRONMENT script/about error but redmine with webrick runs fine.
-
Added by Toshi MARUYAMA about 14 years ago
You need to create config/environments/YOUR_ENVIRONMENT.rb and edit config/database.yml.
RE: RAILS_ENV=YOUR_ENVIRONMENT script/about error but redmine with webrick runs fine.
-
Added by Felix Schäfer about 14 years ago
While Toshi's answer is technically correct, you will want to run RAILS_ENV=production script/about
as your environment seems to be "production" :-)
RE: RAILS_ENV=YOUR_ENVIRONMENT script/about error but redmine with webrick runs fine.
-
Added by Maple Tree about 14 years ago
Thanks guys, it worked after giving the correct Rails_ENV.
Here's my biggest problem. I am trying to access redmine through Apache. (redmine.mydomain.com)
When I do that I am getting:
Application error
Rails application failed to start properly
It works if I run on my server with this command: ruby script/server webrick -e production
This is my Apache Virtual Host Configuration:
<VirtualHost 61.61.41.80:80>
ServerName redmine.mydomain.com
ServerAlias www.redmine.mydomain.com
DocumentRoot /usr/local/redmine-0.9.4/public
ErrorLog logs/redmine_error_log
#DocumentRoot /home/goforaby/public_html/redmine
ServerAdmin webmaster@redmine.mydomain.com
UseCanonicalName On
CustomLog /usr/local/apache/domlogs/redmine.mydomain.com combined
CustomLog /usr/local/apache/domlogs/redmine.mydomain.com-bytes_log "%{%s}t I .\n{%s}t %O ."
## User goforaby # Needed for Cpanel::ApacheConf
<IfModule mod_suphp.c>
suPHP_UserGroup goforaby goforaby
</IfModule>
<IfModule !mod_disable_suexec.c>
SuexecUserGroup goforaby goforaby
</IfModule>
ScriptAlias /cgi-bin/ /home/goforaby/public_html/redmine/cgi-bin/
- To customize this VirtualHost use an include file at the following location # Include "/usr/local/apache/conf/userdata/std/2/goforaby/redmine.mydomain.com/*.conf"
<Directory "/usr/local/redmine-0.9.4/public/">
Options Indexes ExecCGI FollowSymLinks
Order allow,deny
Allow from all
AllowOverride all
</Directory>
</VirtualHost>
root@server [/usr/local/redmine-0.9.4]# RAILS_ENV=production script/about
./script/../config/../vendor/rails/railties/lib/rails/gem_dependency.rb:119:Warning: Gem::Dependency#version_requirements is deprecated and will be removed on or after August 2010. Use #requirement
About your application's environment
Ruby version 1.8.7 (x86_64-linux)
RubyGems version 1.3.7
Rack version 1.0
Rails version 2.3.5
Active Record version 2.3.5
Active Resource version 2.3.5
Action Mailer version 2.3.5
Active Support version 2.3.5
Edge Rails revision unknown
Application root /usr/local/redmine-0.9.4
Environment production
Database adapter mysql
Database schema version 20100221100219
RE: RAILS_ENV=YOUR_ENVIRONMENT script/about error but redmine with webrick runs fine.
-
Added by Felix Schäfer about 14 years ago
I'm sorry I don't know *cgi much, I'd suggest opening a new thread for that. The only problems I know of with *cgi are related to SELinux, try disabling or googling for that if you have a distro with it enabled.