Tag: windows 10

Rails has_secure_password无法加载此类文件–bcrypt

我正在尝试在Ruby on Rails中创建简单的身份validation。 我目前卡住了,因为在数据库中创建表并在模型中添加has_secure_password我收到错误LoadError: cannot load such file — bcrypt 。 当我使用基本命令在rails console尝试时发生错误: User.all 。 我看过很多解决方案,但没有任何帮助。 目前我已经从https://github.com/codahale/bcrypt-ruby.git安装了bcrypt,但仍然无法正常工作。 预先感谢您的帮助。

“无法找到JavaScript运行时”。 我该如何安装?

我无法启动rails服务器。 显然我没有JavaScript运行时。 $ rails s c:/Ruby22/lib/ruby/gems/2.2.0/gems/bundler-1.13.6/lib/bundler/runtime.rb:94:in `rescue in block (2 levels) in require’: There was an error while trying to load the gem ‘uglifier’. (Bundler::GemRequireError) Gem Load Error is: Could not find a JavaScript runtime. See https://github.com/rails/execjs for a list of available runtimes. 我去了链接 https://github.com/rails/execjs 但我无法弄清楚该怎么做。 那么我怎样才能’安装’JavaScript运行时? 这里还有我的GemFile: source ‘https://rubygems.org’ git_source(:github) do |repo_name| repo_name = […]

Windows 10中的bcrypt加载错误

现在我正在尝试在Windows 10中安装bcrypt,但是每当运行webrick服务器时我都会遇到加载错误,如下所示。 C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/bcrypt-3.1.10-x64-mingw32/lib/bcrypt.rb:16:in `require’: cannot load such file — bcrypt_ext (LoadError) 我使用rails 4.1.5和ruby 2.2.3。 当我使用Windows 8.1时,bcrypt没有问题。 当我使用Windows 8.1时,ruby版本是2.1.6 我该如何解决这个bcrypt问题?

Ruby可执行文件不会在Win10和Win7上启动

我用Tk写了一个ruby应用程序,一切都很好,没有错误等等。 所以我用Ocra制作了一个exe,我在开始时遇到了一些问题,但后来我解决了,Ocra没有错误地制作了exe,而且当它让你在编写它之前尝试你的脚本时,没有任何问题。 但是当我双击exe时,什么都没有。 我等了,什么都没有..以管理员的身份运行它,再也没有了…… 我也尝试编写一个简单的脚本,就像一个hello world,但总是同样的问题: 屏幕上或cmd中没有出现错误,但是当我使用TK运行Ocra ruby​​可执行文件时仍然没有任何反应 这是ocra输出: G:\WinRuby\efdsk>ocra efdsk.rb –windows –no-autoload –debug === Loading script to check dependencies === Detected gem did_you_mean-1.2.0 (loaded, files) === 19 files, 38722 bytes === Detected gem ocra-1.3.10 (loaded, files) === 5 files, 210830 bytes === Detected gem tk-0.2.0 (loaded, files) === 419 files, 4623427 bytes === Including […]