在Mac OS X 10.9.2更新后发出运行rails服务器的问题

时间:2014-04-14 17:01:20

标签: ruby-on-rails ruby gem osx-mavericks

我最近升级到小牛队(10.9.2)。现在,当我尝试运行在旧版本10.8.x中正常工作的示例应用程序时,我收到以下错误。当我尝试运行bundle install时,我收到类似的错误。知道这里发生了什么吗?

sample_app jim$ rails server
/Users/jim/.rvm/rubies/ruby-2.0.0-p353/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require': dlopen(/Users/jim/.rvm/rubies/ruby-2.0.0-p353/lib/ruby/2.0.0/x86_64-darwin12.5.0/digest/sha1.bundle, 9): Library not loaded: /usr/local/opt/openssl/lib/libcrypto.1.0.0.dylib (LoadError)
  Referenced from: /Users/jim/.rvm/rubies/ruby-2.0.0-p353/lib/ruby/2.0.0/x86_64-darwin12.5.0/digest/sha1.bundle
  Reason: image not found - /Users/jim/.rvm/rubies/ruby-2.0.0-p353/lib/ruby/2.0.0/x86_64-darwin12.5.0/digest/sha1.bundle
    from /Users/jim/.rvm/rubies/ruby-2.0.0-p353/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
    from /Users/jim/.rvm/gems/ruby-2.0.0-p353@global/gems/bundler-1.3.5/lib/bundler/definition.rb:1:in `<top (required)>'
    from /Users/jim/.rvm/gems/ruby-2.0.0-p353@global/gems/bundler-1.3.5/lib/bundler.rb:148:in `definition'
    from /Users/jim/.rvm/gems/ruby-2.0.0-p353@global/gems/bundler-1.3.5/lib/bundler.rb:116:in `setup'
    from /Users/jim/.rvm/gems/ruby-2.0.0-p353@global/gems/bundler-1.3.5/lib/bundler/setup.rb:7:in `<top (required)>'
    from /Users/jim/.rvm/rubies/ruby-2.0.0-p353/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:135:in `require'
    from /Users/jim/.rvm/rubies/ruby-2.0.0-p353/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:135:in `rescue in require'
    from /Users/jim/.rvm/rubies/ruby-2.0.0-p353/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:144:in `require'
    from /Users/jim/rails_projects/Sample_App/config/boot.rb:4:in `<top (required)>'
    from bin/rails:3:in `require_relative'
    from bin/rails:3:in `<main>'

的Gemfile:

source 'https://rubygems.org'
ruby '2.0.0'
#ruby-gemset=railstutorial_rails_4_0

gem 'rails', '4.0.2'

gem 'bootstrap-sass', '2.3.2.0'

gem 'bcrypt-ruby', '3.1.2'

gem 'faker', '1.1.2'
gem 'will_paginate', '3.0.4'
gem 'bootstrap-will_paginate', '0.0.9'



group :development, :test do
  gem 'sqlite3', '1.3.8'
  gem 'rspec-rails', '2.13.1'
  gem 'guard-rspec', '2.5.0'
  gem 'spork-rails', '4.0.0'
  gem 'guard-spork', '1.5.0'
  gem 'childprocess', '0.3.6'
end

group :test do
  gem 'selenium-webdriver', '2.35.1'
  gem 'capybara', '2.1.0'
  gem 'factory_girl_rails', '4.2.1' # thoughtbot
  gem 'cucumber-rails', '1.4.0', :require => false
  gem 'database_cleaner', github: 'bmabey/database_cleaner'

  # Uncomment this line on OS X.
  gem 'growl', '1.0.3'

  # Uncomment these lines on Linux.
  # gem 'libnotify', '0.8.0'

  # Uncomment these lines on Windows.
  # gem 'rb-notifu', '0.0.4'
  # gem 'win32console', '1.3.2'
  # gem 'wdm', '0.1.0'
end

gem 'sass-rails', '4.0.2' #updated to .0.2
gem 'uglifier', '2.1.1'
gem 'coffee-rails', '4.0.1'
gem 'jquery-rails', '3.0.4'
gem 'turbolinks', '1.1.1'
gem 'jbuilder', '1.0.2'
gem 'sunspot_rails'

gem 'acts-as-taggable-on' , '~> 2.4.1' #gem for tagging
#gem 'protected_attributes' #protected attributes

gem 'thread_safe', '0.2.0' #added to fix error

group :doc do
  gem 'sdoc', '0.3.20', require: false
end

group :production do
  gem 'pg', '0.15.1'
  gem 'rails_12factor', '0.0.2'
end

更新:

按照规定运行RVM命令。运行rvm reinstall ruby-2.0.0后,我收到以下错误:

Error running 'env GEM_HOME= GEM_PATH= /Users/jim/.rvm/rubies/ruby-2.0.0-p451/bin/ruby -d /Users/jim/.rvm/src/rubygems-2.2.2/setup.rb',
showing last 15 lines of /Users/jim/.rvm/log/1397496177_ruby-2.0.0-p451/rubygems.install.log
  Reason: image not found - /Users/jim/.rvm/rubies/ruby-2.0.0-p451/lib/ruby/2.0.0/x86_64-darwin13.1.0/psych.bundle
    from /Users/jim/.rvm/src/rubygems-2.2.2/lib/rubygems/core_ext/kernel_require.rb:55:in `require'
    from /Users/jim/.rvm/rubies/ruby-2.0.0-p451/lib/ruby/2.0.0/psych.rb:1:in `<top (required)>'
    from /Users/jim/.rvm/src/rubygems-2.2.2/lib/rubygems/core_ext/kernel_require.rb:55:in `require'
    from /Users/jim/.rvm/src/rubygems-2.2.2/lib/rubygems/core_ext/kernel_require.rb:55:in `require'
    from /Users/jim/.rvm/rubies/ruby-2.0.0-p451/lib/ruby/2.0.0/yaml.rb:5:in `<top (required)>'
    from /Users/jim/.rvm/src/rubygems-2.2.2/lib/rubygems/core_ext/kernel_require.rb:55:in `require'
    from /Users/jim/.rvm/src/rubygems-2.2.2/lib/rubygems/core_ext/kernel_require.rb:55:in `require'
    from /Users/jim/.rvm/src/rubygems-2.2.2/lib/rubygems.rb:616:in `load_yaml'
    from /Users/jim/.rvm/src/rubygems-2.2.2/lib/rubygems/config_file.rb:328:in `load_file'
    from /Users/jim/.rvm/src/rubygems-2.2.2/lib/rubygems/config_file.rb:197:in `initialize'
    from /Users/jim/.rvm/src/rubygems-2.2.2/lib/rubygems/gem_runner.rb:74:in `new'
    from /Users/jim/.rvm/src/rubygems-2.2.2/lib/rubygems/gem_runner.rb:74:in `do_configuration'
    from /Users/jim/.rvm/src/rubygems-2.2.2/lib/rubygems/gem_runner.rb:39:in `run'
    from setup.rb:45:in `<main>'

0 个答案:

没有答案