博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
Invalid command 'RailsBaseURI'
阅读量:4474 次
发布时间:2019-06-08

本文共 6698 字,大约阅读时间需要 22 分钟。

 

 官方指导

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>'

看看源代码:

 

 ##
  # 
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 `
' /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 `
' /var/lib/gems/1.8/gems/passenger-4.0.10/helper-scripts/rack-preloader.rb:6:in `
' /var/lib/gems/1.8/gems/passenger-4.0.10/helper-scripts/rack-preloader.rb:5:in `
'

解决:

#删除完gem uninstall ruby-openid#installgem install ruby-openid -v

 

 

 

 

 

 

 

转载于:https://www.cnblogs.com/jevan/p/3247994.html

你可能感兴趣的文章
opencv相关
查看>>
UPC 2188 Balls(DP)
查看>>
重组索引(带统计索引重组时间)
查看>>
Linux&UNIX上卸载GoldenGate的方法
查看>>
HTML语义化标签
查看>>
Java实现HTML转PDF的总结
查看>>
人工智能实战_第三次作业_田博
查看>>
第1章 游戏之乐——买书问题
查看>>
mysql的导入和导出
查看>>
数据处理算法
查看>>
绘制方框云线标注
查看>>
bzoj1620:时间管理
查看>>
最近准备整理一下手头资料,开发一个工作流和表单管理系统
查看>>
C#与数据结构--图的遍历
查看>>
ispy 编译笔记
查看>>
bzoj1067——SCOI2007降雨量(线段树,细节题)
查看>>
day 1
查看>>
洛谷P1282 多米诺骨牌【线性dp】
查看>>
数据类型的提升(promotion)
查看>>
Thead是不能返回值的,但是作为更高级的Task当然要弥补一下这个功能。
查看>>