Invalid command 'RailsBaseURI'
来源:互联网 发布:华为mate9 知乎 编辑:程序博客网 时间:2024/06/11 22:30
官方指导
http://www.redmine.org/projects/redmine/wiki/HowTo_Install_Redmine_on_Ubuntu_step_by_step
解决使用了下面三步:
1, apt-get install libapache2-mod-passenger
2,a2enmod passenger
3,service apache2 restart
问题解决,apache正常启动,但是redmine运行报错。
报错如下:
[Fri Aug 09 13:54:51 2013] [notice] caught SIGTERM, shutting down
[Fri Aug 09 13:54:52 2013] [notice] Apache/2.2.22 (Ubuntu) Phusion_Passenger/2.2.11 configured -- resuming normal operations
/usr/local/lib/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:51:in `require': cannot load such file -- phusion_passenger/utils (LoadError)
from /usr/local/lib/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:51:in `require'
from /usr/lib/phusion_passenger/passenger-spawn-server:53:in `<main>'
[Fri Aug 09 13:54:52 2013] [notice] Apache/2.2.22 (Ubuntu) Phusion_Passenger/2.2.11 configured -- resuming normal operations
/usr/local/lib/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:51:in `require': cannot load such file -- phusion_passenger/utils (LoadError)
from /usr/local/lib/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:51:in `require'
from /usr/lib/phusion_passenger/passenger-spawn-server:53:in `<main>'
看看源代码:
##
# When RubyGems is required, Kernel#require is replaced with our own which
# is capable of loading gems on demand.
#
# When you call <tt>require 'x'</tt>, this is what happens:
# * If the file can be loaded from the existing Ruby loadpath, it
# is.
# * Otherwise, installed gems are searched for a file that matches.
# If it's found in gem 'y', that gem is activated (added to the
# loadpath).
#
# The normal <tt>require</tt> functionality of returning false if
# that file has already been loaded is preserved.
ACTIVATION_MONITOR = Monitor.new
def require path
ACTIVATION_MONITOR.enter
spec = Gem.find_unresolved_default_spec(path)
if spec
Gem.remove_unresolved_default_spec(spec)
gem(spec.name)
end
# If there are no unresolved deps, then we can use just try
# normal require handle loading a gem from the rescue below.
if Gem::Specification.unresolved_deps.empty? then
return gem_original_require(path) <-------------这行报错。
end
# If +path+ is for a gem that has already been loaded, don't
# bother trying to find it in an unresolved gem, just go straight
# to normal require.
#--
# TODO request access to the C implementation of this to speed up RubyGems
spec = Gem::Specification.find { |s|
s.activated? and s.contains_requirable_file? path
}
# When RubyGems is required, Kernel#require is replaced with our own which
# is capable of loading gems on demand.
#
# When you call <tt>require 'x'</tt>, this is what happens:
# * If the file can be loaded from the existing Ruby loadpath, it
# is.
# * Otherwise, installed gems are searched for a file that matches.
# If it's found in gem 'y', that gem is activated (added to the
# loadpath).
#
# The normal <tt>require</tt> functionality of returning false if
# that file has already been loaded is preserved.
ACTIVATION_MONITOR = Monitor.new
def require path
ACTIVATION_MONITOR.enter
spec = Gem.find_unresolved_default_spec(path)
if spec
Gem.remove_unresolved_default_spec(spec)
gem(spec.name)
end
# If there are no unresolved deps, then we can use just try
# normal require handle loading a gem from the rescue below.
if Gem::Specification.unresolved_deps.empty? then
return gem_original_require(path) <-------------这行报错。
end
# If +path+ is for a gem that has already been loaded, don't
# bother trying to find it in an unresolved gem, just go straight
# to normal require.
#--
# TODO request access to the C implementation of this to speed up RubyGems
spec = Gem::Specification.find { |s|
s.activated? and s.contains_requirable_file? path
}
由于从来未接触过ruby,看代码,估计所依赖不足(缺少依赖)导致。
http://hooney.iteye.com/blog/259744 这个文章很有帮助。
参照http://itecsoftware.com/install-redmine-using-passenger-via-apache-on-ubuntu-10-04安装号passenger
然后其它全部使用gem install 安装其它依赖即可。参考:http://stackoverflow.com/questions/16376010/ubuntu-cannot-install-rmagick
Can't install RMagick 2.0.0. Can't find MagickCore.h.*** extconf.rb failed ***Could not create Makefile due to some reason, probably lack ofnecessary libraries and/or headers. Check the mkmf.log file for moredetails. You may need configuration options.Provided configuration options: --with-opt-dir --without-opt-dir --with-opt-include --without-opt-include=${opt-dir}/include --with-opt-lib --without-opt-lib=${opt-dir}/lib --with-make-prog --without-make-prog --srcdir=. --curdir --ruby=/usr/bin/ruby1.9.1ERROR: Error installing rmagick: ERROR: Failed to build gem native extension. Building has failed. See above output for more information on the failure.Gem files will remain installed in /usr/lib/ruby/gems/1.9.1/gems/rmagick-2.0.0 for inspection.Results logged to /usr/lib/ruby/gems/1.9.1/gems/rmagick-2.0.0/ext/RMagick/gem_make.out
使用
apt-get install imagemagick libmagickwand-dev
缺少库:
/usr/bin/ruby1.9.1 extconf.rbchecking for Ruby version >= 1.8.2... yeschecking for Magick-config... yeschecking for ImageMagick version >= 6.3.0... yeschecking for HDRI disabled version of ImageMagick... yeschecking for sys/types.h... yeschecking for magick/MagickCore.h... yeschecking for InitializeMagick() in -lMagick... noCan't install RMagick 2.0.0. Can't find libMagick or one of the dependent libraries. Check the mkmf.log file for more detailed information.*** extconf.rb failed ***Could not create Makefile due to some reason, probably lack ofnecessary libraries and/or headers. Check the mkmf.log file for moredetails. You may need configuration options.Provided configuration options: --with-opt-dir --without-opt-dir --with-opt-include --without-opt-include=${opt-dir}/include --with-opt-lib --without-opt-lib=${opt-dir}/lib --with-make-prog --without-make-prog --srcdir=. --curdir --ruby=/usr/bin/ruby1.9.1 --with-Magicklib --without-MagicklibERROR: Error installing rmagick: ERROR: Failed to build gem native extension. Building has failed. See above output for more information on the failure.Gem files will remain installed in /usr/lib/ruby/gems/1.9.1/gems/rmagick-2.0.0 for inspection.Results logged to /usr/lib/ruby/gems/1.9.1/gems/rmagick-2.0.0/ext/RMagick/gem_make.out
解决:
#地板本的rmagick会出错gem install rmagick -v 2.13.2 -V
问题:
Error page:Bundler could not find compatible versions for gem "ruby-openid": In Gemfile: rack-openid (>= 0) ruby depends on ruby-openid (>= 2.1.8) ruby ruby-openid (2.1.4) (Bundler::VersionConflict) /usr/lib/ruby/gems/1.9.1/gems/bundler-1.3.5/lib/bundler/resolver.rb:130:in `block in resolve' /usr/lib/ruby/gems/1.9.1/gems/bundler-1.3.5/lib/bundler/resolver.rb:128:in `catch' /usr/lib/ruby/gems/1.9.1/gems/bundler-1.3.5/lib/bundler/resolver.rb:128:in `resolve' /usr/lib/ruby/gems/1.9.1/gems/bundler-1.3.5/lib/bundler/definition.rb:179:in `resolve' /usr/lib/ruby/gems/1.9.1/gems/bundler-1.3.5/lib/bundler/definition.rb:114:in `specs' /usr/lib/ruby/gems/1.9.1/gems/bundler-1.3.5/lib/bundler/definition.rb:159:in `specs_for' /usr/lib/ruby/gems/1.9.1/gems/bundler-1.3.5/lib/bundler/definition.rb:148:in `requested_specs' /usr/lib/ruby/gems/1.9.1/gems/bundler-1.3.5/lib/bundler/environment.rb:18:in `requested_specs' /usr/lib/ruby/gems/1.9.1/gems/bundler-1.3.5/lib/bundler/runtime.rb:13:in `setup' /usr/lib/ruby/gems/1.9.1/gems/bundler-1.3.5/lib/bundler.rb:120:in `setup' /usr/lib/ruby/gems/1.9.1/gems/bundler-1.3.5/lib/bundler/setup.rb:17:in `<top (required)>' /usr/local/lib/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:116:in `require' /usr/local/lib/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:116:in `rescue in require' /usr/local/lib/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:122:in `require' /var/lib/gems/1.8/gems/passenger-4.0.10/lib/phusion_passenger/loader_shared_helpers.rb:212:in `run_load_path_setup_code' /var/lib/gems/1.8/gems/passenger-4.0.10/helper-scripts/rack-preloader.rb:73:in `preload_app' /var/lib/gems/1.8/gems/passenger-4.0.10/helper-scripts/rack-preloader.rb:127:in `<module:App>' /var/lib/gems/1.8/gems/passenger-4.0.10/helper-scripts/rack-preloader.rb:6:in `<module:PhusionPassenger>' /var/lib/gems/1.8/gems/passenger-4.0.10/helper-scripts/rack-preloader.rb:5:in `<main>'
解决:
#删除完gem uninstall ruby-openid#installgem install ruby-openid -v
0 0
- Invalid command 'RailsBaseURI'
- Problem:"Invalid command: ${GetTime}"
- Invalid command 'RewriteEngine' 解决办法
- Invalid command 'RewriteEngine'解决办法
- Invalid command \'RewriteEngine\' 解决办法
- Error:Invalid command android
- zip error: Invalid command arguments
- zip error: Invalid command arguments
- zip error: Invalid command arguments
- zip error: Invalid command arguments
- expect error invalid command name
- 【转】解决方法:invalid command name "Resource/Energy"
- 解决方法:invalid command name "Resource/Energy
- PHP 500 -Invalid command RewriteEngine的解决
- Invalid command ‘RewriteEngine’ ubuntu 解决报错。
- Apache启动错误:Invalid command 'Order'
- Ubuntu上Invalid command 'RewriteEngine'解决办法
- Invalid command 'AuthzSVNAccessFile',方式配置问题解决
- Java中执行shell笔记
- State模式学习笔记
- 【转】windows浏览共享切换用户登录的方法
- 查看Samba用户的方法
- Ubuntu 12.4 server 安装 redmine
- Invalid command 'RailsBaseURI'
- gcc编译参数之m32 m64
- 取消putty右键粘贴功能
- ubuntu12.04 desktop默认无ssh支持
- ubuntu 12.04 x86_64:java.lang.UnsatisfiedLinkError: Could not load SWT library. Reasons
- ubuntu12.04下编译chrome
- Exception
- goagant:403. That’s an error.
- 使用U盘安装ubuntu 12.04(使用大白菜u盘启动工具)