zoukankan      html  css  js  c++  java
  • Invalid command 'RailsBaseURI'

     官方指导

    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 of
    necessary libraries and/or headers.  Check the mkmf.log file for more
    details.  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
    ERROR:  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.rb
    checking for Ruby version >= 1.8.2... yes
    checking for Magick-config... yes
    checking for ImageMagick version >= 6.3.0... yes
    checking for HDRI disabled version of ImageMagick... yes
    checking for sys/types.h... yes
    checking for magick/MagickCore.h... yes
    checking for InitializeMagick() in -lMagick... no
    Can'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 of
    necessary libraries and/or headers.  Check the mkmf.log file for more
    details.  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-Magicklib
    ERROR:  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
    #install
    gem install ruby-openid -v 
  • 相关阅读:
    关于git修改和查看用户名邮箱
    Spring深入理解(三)
    Spring深入理解(二)
    Spring深入理解(一)
    jeecg开源快速开发
    关于面向对象的三大特性和五大基本原则
    关于Excel导入导出POI工具类
    关于Hanoi算法
    LOJ 530 最小倍数(数论)
    BZOJ 4242 水壶(BFS建图+最小生成树+树上倍增)
  • 原文地址:https://www.cnblogs.com/jevan/p/3247994.html
Copyright © 2011-2022 走看看