- android - RelativeLayout 背景可绘制重叠内容
- android - 如何链接 cpufeatures lib 以获取 native android 库?
- java - OnItemClickListener 不起作用,但 OnLongItemClickListener 在自定义 ListView 中起作用
- java - Android 文件转字符串
我正在使用 devise 的 gem,我在 Devise::RegistrationsController#create 中收到错误 LoadError #create cannot load such file -- bcrypt_ext.. 我试图对这个问题做一些研究,也试着按照给定的说明(https://stackoverflow.com/questions/35422463/loaderror-in-deviseregistrationscontrollercreate-cannot-load-such-file-bc)
但是还是有这个问题。有什么建议吗?
注意:我使用的指南是 video guide我在 Windows 7 上使用 ruby on rails
gem 文件
source 'https://rubygems.org'
git_source(:github) do |repo_name|
repo_name = "#{repo_name}/#{repo_name}" unless repo_name.include?("/")
"https://github.com/#{repo_name}.git"
end
# error in devise
gem 'bcrypt-ruby', '~> 3.1', '>= 3.1.5'
# Bundle for authentication
gem 'devise', '~> 4.2', '>= 4.2.1'
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '~> 5.1.0.rc1'
# Use postgresql as the database for Active Record
gem 'pg', '~> 0.18'
# Use Puma as the app server
gem 'puma', '~> 3.7'
# Use SCSS for stylesheets
gem 'sass-rails', github: "rails/sass-rails"
# Use Uglifier as compressor for JavaScript assets
gem 'uglifier', '>= 1.3.0'
# See https://github.com/rails/execjs#readme for more supported runtimes
# gem 'therubyracer', platforms: :ruby
# Use CoffeeScript for .coffee assets and views
gem 'coffee-rails', '~> 4.2'
# Turbolinks makes navigating your web application faster. Read more: https://github.com/turbolinks/turbolinks
gem 'turbolinks', '~> 5'
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
gem 'jbuilder', '~> 2.5'
# Use Redis adapter to run Action Cable in production
# gem 'redis', '~> 3.0'
# Use ActiveModel has_secure_password
# gem 'bcrypt', '~> 3.1.7'
# Use Capistrano for deployment
# gem 'capistrano-rails', group: :development
group :development, :test do
# Call 'byebug' anywhere in the code to stop execution and get a debugger console
gem 'byebug', platforms: [:mri, :mingw, :x64_mingw]
# Adds support for Capybara system testing and selenium driver
gem 'capybara', '~> 2.13.0'
gem 'selenium-webdriver'
end
group :development do
# Access an IRB console on exception pages or by using <%= console %> anywhere in the code.
gem 'web-console', '>= 3.3.0'
end
# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]
最佳答案
我也有同样的错误,我的问题已经解决了,请尝试解决方案3
问题是编译的 windows gem。如果删除它并只包含纯 ruby 版本会更好。
解决方法一:
您可以将 bcrypt_ext.so 从\lib\2.1 复制到与 bcrypt.rb 相同的文件夹\lib
方案二:
你可以使用 gem install bcrypt --platform=ruby 即使我很难从它总是使用编译版本的 rails 中选择它
方案三:
git 克隆 https://github.com/codahale/bcrypt-ruby.git
cd bcrypt-ruby
gem 构建 bcrypt.gemspec
gem 安装 gem 编译器
gem 编译 bcrypt-3.1.10.gem
gem 安装 bcrypt-3.1.10-x64-mingw32.gem --local
关于ruby-on-rails - 设计中的 LoadError::RegistrationsController#create,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43461267/
我确实安装了下面提到的 ruby 东西 当我尝试执行 chef-client 时,我收到下面提到的错误 c:\RubyDevKit>chef-client C:/Ruby193/lib/ruby/
完整堆栈跟踪: /Users/galharth/.rvm/gems/ruby-2.3.0/gems/activesupport-4.2.5/lib/active_support/dependencie
我尝试使用 Ruby(在 Windows 下)连接到数据库。为此: 在 C:\Ruby193 安装 Ruby 安装 devkit (c:\ruby193\devkit)。运行“ruby dk.rb i
当我尝试在命令行中包含一个库时,我收到 LoadError 消息 $ ruby -v ruby 1.8.7 (2012-06-29 patchlevel 370) $ gem list | grep
这里的 Ruby 新手试图弄清楚如何使用 Gem,到目前为止,体验并不是很好。 在通过 gem 安装 mysql2 之后,我尝试在一个简单的文件中使用它。 require 'mysql2'#clien
我已经按照 https://github.com/cucumber/cucumber-rails#installation 在新的 Rails 4 应用程序中安装了 Cucumber-rails ge
在我的应用程序中;当我提交表单时,出现此错误: LoadError at /questions Unable to autoload constant Message, expected /app/m
似乎自动加载器正在加载 lib/tools/address 而不是我的模型 地址抛出以下错误 LoadError: Unable to autoload constant Address, expec
我想使用 smarter_csv gem,但是当我在代码中写入 require "smarter_csv" 时,它会给我以下错误消息: /System/Library/Frameworks/Ruby.
我刚开始使用 ruby,但在使用 bundle 时遇到困难。 bundle install 我的错误: /usr/local/lib/ruby/site_ruby/2.1.0/rubygems/c
在这个应用程序上一切正常,现在我在尝试推送到 Heroku 时得到了这个: Counting objects: 28, done. Delta compression using up to 4 th
我是 ruby 新手。我只是安装成功模块 libxml-ruby。当我运行一个需要“xml”的脚本时,它出现错误: C:/Ruby23-x64/lib/ruby/2.3.0/rubygems/core
我运行 pod install,但出现错误 LoadError - cannot load such file -- xcodeproj/prebuilt/x86_64-darwin12.5.0-2.
我正在尝试向我的 Xcode 项目添加一个 pod。我收到此错误: LoadError - no such file to load -- xcodeproj/prebuilt/universal-d
这个问题困扰了我几天...每当我使用 .bring_to_front 方法时 require "rubygems" require "watir" browser = Watir::Browser::
例如,当我需要一个文件(称为 st.rb)时: require 'rubygems' require 'mongrel' class TestHandler > require 'st.rb' Loa
我已经在 Ubuntu 上安装了 Julia 1.5.3,但 IJulia falis 带有 LoadError,如屏幕截图所示。 第一个conda环境的路径很不对,这个是在Ubuntu上跑的。 Pr
我在运行以下 Julia 代码片段时遇到错误 using GR, Interact t = 0:0.01:1 @manipulate for phi=0:0.1:6.28 plot(cos.(2
我无法运行 ruby Web 应用程序,并且收到以下消息错误: rackup webapp/config.ru --debug nil Exception `LoadError' at /usr/
我正在尝试按照本教程使用设计创建 token 身份验证: http://www.strukturedkaos.com/2011/09/19/soup-to-nuts-token-authenticat
我是一名优秀的程序员,十分优秀!