2016-06-07 36 views
-1

我的機器是Windows 8 32位機器,我有紅寶石2.1.8。由於bcrypt,無法運行我的應用程序的美洲獅服務器

我正試圖在Puma和Rails服務器中打開我的應用程序時遇到問題。我甚至無法運行bundle install。該erorr是:

in `require': 126: The specified module could not be found. 
    - C:/Ruby21/lib/ruby/gems/2.1.0/gems/bcrypt-ruby-3.1.1.rc1-x86-mingw32/lib/bcrypt_ext.so (LoadError) 

和包安裝錯誤是:

could not find gem 'bcrypt (=3.1.5 rc1) x64-mingw32' in any of the gemfile ruby 2.1.8 

同樣的問題也發生了bcrypt版本3.0.0和3.1.1也

我的Gemfile是:

source 'http://rubygems.org' 

# Bundle edge Rails instead: gem 'rails', github: 'rails/rails' 
gem 'rails', '4.1.9' 

# Use sqlite3 as the database for Active Record 
gem 'pg' 

gem 'plivo' 
# Use SCSS for stylesheets 
gem 'sass-rails', '~> 4.0.0' 

# Use Uglifier as compressor for JavaScript assets 
gem 'uglifier', '>= 1.3.0' 

# Use CoffeeScript for .js.coffee assets and views 
gem 'coffee-rails', '~> 4.0.0' 
gem 'coffee-script-source', '1.8.0' 

# See https://github.com/sstephenson/execjs#readme for more supported runtimes 
# gem 'therubyracer', platforms: :ruby 

# Use jquery as the JavaScript library gem 'jquery-rails' 

gem 'rails-jquery-autocomplete', :git 'https://github.com/AyushRuiaHW/rails-jquery-autocomplete.git' 

# Turbolinks makes following links in your web application faster. Read more: https://github.com/rails/turbolinks 
gem 'turbolinks' 

# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder 
gem 'jbuilder', '~> 1.2' 

group :doc do 
# bundle exec rake doc:rails generates the API under doc/api. 
gem 'sdoc', require: false 
end 

gem 'tzinfo-data' 
gem 'faraday' 
gem 'hypdf', '~> 1.0.12' 
gem 'currency-in-words' 
gem "jquery-ui-rails" 
gem 'Instamojo-rb' 
gem "kaminari" 
gem "rails-erd" 
gem 'levenshtein', '~> 0.2.2' 
gem "lol_dba" 
gem "bullet", :group => "development" 
gem "bootstrap-sass" 
gem 'rack-mini-profiler' 
gem 'newrelic_rpm' 
gem 'puma_worker_killer' 
# Use ActiveModel has_secure_password 
# gem 'bcrypt-ruby', '~> 3.0.0' 

# Use unicorn as the app server 
# gem 'unicorn' 

# Use Capistrano for deployment 
# gem 'capistrano', group: :development 

# Use debugger 
# gem 'debugger', group: [:development, :test] 

gem 'postmark-rails' 
gem 'bcrypt-ruby', '3.1.5.rc1', :require => 'bcrypt' 
gem 'puma' 
gem "paperclip", "~> 3.0" 
gem 'aws-sdk', '~> 1' 
gem 'aws-sdk-resources', '~> 2' 
gem 'rails_12factor', group: :production 

ruby "2.1.8" 
+0

在Windows [紅寶石的可能的複製導致錯誤無法加載此類文件bcrypt \ _ext](http://stackoverflow.com/questions/29293321/ruby-on-windows-causes-error-cannot-load-such-file-bcrypt-ext) –

回答

0

刪除您的舊寶石'bcrypt-ruby',並插入

gem 'bcrypt', '~> 3.1', '>= 3.1.11' 

和運行

bundle install 
0

您需要使用以下

gem 'bcrypt-ruby', '~> 3.1.0' 

刪除舊的寶石和更新您的Gemfile和運行bundle install,然後重新啓動服務器。

您可能還想嘗試刪除您的gemfile.lock並重新運行bundle install

OR

可以安裝寶石bcrypt直接在命令行如下:

gem install --version='3.1.0' bcrypt-ruby 

然後運行bundle install

相關問題