我正在 ubuntu vagrant box 中设置 JRuby 1.7 以与 Torquebox 一起使用。我正在使用Torquebox-remote-deployer gem 将存档文件和应用程序内容部署到虚拟机。现在,当 gem 尝试执行时bundle exec rake db:migrate,我收到以下错误:
bundler: not executable: rake
Run Code Online (Sandbox Code Playgroud)
现在,当我检查供应商/bundle/jruby/1.9/bin 目录时,rake 和所有其他所需的可执行文件都在那里。我还尝试通过本地 jruby 安装运行捆绑命令以确保正确调用它,但我得到了相同的结果
/opt/jruby/bin/jruby -S bundle exec rake db:migrate
Run Code Online (Sandbox Code Playgroud)
有什么建议么?如果您需要更多信息,请询问。
我在 Passenger 上使用 Rails 并得到:
Could not find multi_json-1.7.3 in any of the sources (Bundler::GemNotFound)
Run Code Online (Sandbox Code Playgroud)
我想我只需要安装 multi_json 但它在几天前就可以工作了,所以我很好奇 - 解决这个问题的最佳方法是什么?
我正在尝试解决Windows 上ffi Gem中的错误。我需要运行bundle install一些从互联网上获取的项目。问题是bundle install尝试安装ffi版本 1.9.9时会出错。
有什么方法可以告诉我安装ffibundle install版本 1.9.8 吗?也许是一个命令行参数,或者是对or的补充。GemfileGemfile.lock
一个可能的复杂情况是,我正在处理的 Gemfile根本没有列出ffi,因此它必须由依赖项的依赖项之一拉入。
我正在尝试将使用 mongoid 的 Rails 应用程序部署到我的远程生产服务器。
在我的中mongoid.yml我添加了这个:
hosts:
- <%= ENV['MONGOSERVER_PORT_27017_TCP_ADDR'] %>:27017
Run Code Online (Sandbox Code Playgroud)
当我启动 Capistrano 时,它会抛出以下错误:
SSHKit::Command::Failed: rake exit status: 1
rake stdout: rake aborted!
NoMethodError: undefined method `split' for :"27017":Symbol
Run Code Online (Sandbox Code Playgroud)
添加下划线会导致此错误发生吗?
我目前正在尝试运行 run.rb 文件,但我不断收到 sqlite3 的错误。当我输入 时bundle install,我收到此成功消息:
Fetching gem metadata from https://rubygems.org/.........
Resolving dependencies...
Using rake 12.3.2
Using concurrent-ruby 1.1.4
Using i18n 1.5.3
Using minitest 5.11.3
Using thread_safe 0.3.6
Using tzinfo 1.2.5
Using activesupport 5.2.2
Using activemodel 5.2.2
Using arel 9.0.0
Using activerecord 5.2.2
Using bundler 2.0.1
Using coderay 1.1.2
Using equatable 0.5.0
Using method_source 0.9.2
Using mustermann 1.0.3
Using necromancer 0.4.0
Using tty-color 0.4.3
Using pastel 0.7.2
Using pry 0.12.2
Using rack 2.0.6
Using rack-protection 2.0.5
Using …Run Code Online (Sandbox Code Playgroud) 我使用“fuubar”作为我选择的 RSpec 格式化程序。在我的~/.rspecI中--format Fuubar,这意味着在任何 RSpec 运行中、在任何项目中(无论 Gemfile 内容如何)--format Fuubar都会使用。
我不想将其添加为项目的依赖项,因为这是非常个人化的事情,在某些项目中,您作为一个团队决定保持 Gemfile 的精简,而不使用不必要的 gem。
如何在--format Fuubar不将 Fuubar gem 添加到 Gemfile 的情况下运行 RSpec?
在未安装 fuubar 的情况下运行时出现的错误rspec:
/Users/filip.bartuzi/.asdf/installs/ruby/2.6.2/lib/ruby/gems/2.6.0/gems/activesupport-5.1.6.2/lib/active_support/dependencies.rb:292:in `require': cannot load such file -- fuubar (LoadError)
Run Code Online (Sandbox Code Playgroud) 在新安装的osx rvm之后,运行bundle install的bundler和rails 3以某种方式解压缩了我的应用程序中的所有内容.我做了以下事情:
安装了rvm
$ bash < <( curl http://rvm.beginrescueend.com/releases/rvm-install-head )
Run Code Online (Sandbox Code Playgroud)
在bash中添加了以下内容
[[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm" # This loads RVM into a shell session.
Run Code Online (Sandbox Code Playgroud)
通过rvm安装红宝石
rvm install 1.9.2
rvm -default 1.9.2
Run Code Online (Sandbox Code Playgroud)
由rubygems安装的导轨
gem install rails
Run Code Online (Sandbox Code Playgroud)
安装捆绑器
gem install bundle
Run Code Online (Sandbox Code Playgroud)
从现有的rails应用程序中安装了我的宝石
bundle install
Run Code Online (Sandbox Code Playgroud)
这将导致在下面的目录结构中我的应用程序根目录:
mycoolblog/rails/ruby/1.9.1/bin | bundler | cache | doc | gems | specification
Run Code Online (Sandbox Code Playgroud)
显然我的安装有问题,但不知道如何修复它.如果我需要在投票结束此问题之前提供更多详细信息,请告知我们.
我遵循这些说明:https://github.com/phifty/agraph/blob/master/README.rdoc,并且使用此命令安装gem的步骤如下:
gem install agraph
Run Code Online (Sandbox Code Playgroud)
我是RoR的新手,但我有RVM和Bundler.我不确定应该使用哪个.我应该使用RVM还是Bundler安装它?该命令应该是什么?
我试图捆绑安装,但这是我得到的:
/home/mywebsite/.rvm/rubies/ruby-1.9.3-p362/lib/ruby/site_ruby/1.9.1/rubygems/version.rb:187:in `initialize': Malformed version number string = 1.0.3 (ArgumentError)
/home/mywebsite/.rvm/gems/ruby-1.9.3-p362@global/gems/bundler-1.2.3/lib/bundler/lockfile_parser.rb:104:in `new'
/home/mywebsite/.rvm/gems/ruby-1.9.3-p362@global/gems/bundler-1.2.3/lib/bundler/lockfile_parser.rb:104:in `parse_spec'
/home/mywebsite/.rvm/gems/ruby-1.9.3-p362@global/gems/bundler-1.2.3/lib/bundler/lockfile_parser.rb:71:in `parse_source'
/home/mywebsite/.rvm/gems/ruby-1.9.3-p362@global/gems/bundler-1.2.3/lib/bundler/lockfile_parser.rb:30:in `block in initialize'
/home/mywebsite/.rvm/gems/ruby-1.9.3-p362@global/gems/bundler-1.2.3/lib/bundler/lockfile_parser.rb:24:in `each'
/home/mywebsite/.rvm/gems/ruby-1.9.3-p362@global/gems/bundler-1.2.3/lib/bundler/lockfile_parser.rb:24:in `initialize'
/home/mywebsite/.rvm/gems/ruby-1.9.3-p362@global/gems/bundler-1.2.3/lib/bundler/definition.rb:44:in `new'
/home/mywebsite/.rvm/gems/ruby-1.9.3-p362@global/gems/bundler-1.2.3/lib/bundler/definition.rb:44:in `initialize'
/home/mywebsite/.rvm/gems/ruby-1.9.3-p362@global/gems/bundler-1.2.3/lib/bundler/dsl.rb:148:in `new'
/home/mywebsite/.rvm/gems/ruby-1.9.3-p362@global/gems/bundler-1.2.3/lib/bundler/dsl.rb:148:in `to_definition'
/home/mywebsite/.rvm/gems/ruby-1.9.3-p362@global/gems/bundler-1.2.3/lib/bundler/dsl.rb:8:in `evaluate'
/home/mywebsite/.rvm/gems/ruby-1.9.3-p362@global/gems/bundler-1.2.3/lib/bundler/definition.rb:18:in `build'
/home/mywebsite/.rvm/gems/ruby-1.9.3-p362@global/gems/bundler-1.2.3/lib/bundler.rb:144:in `definition'
/home/mywebsite/.rvm/gems/ruby-1.9.3-p362@global/gems/bundler-1.2.3/lib/bundler/cli.rb:228:in `install'
/home/mywebsite/.rvm/gems/ruby-1.9.3-p362@global/gems/bundler-1.2.3/lib/bundler/vendor/thor/task.rb:27:in `run'
/home/mywebsite/.rvm/gems/ruby-1.9.3-p362@global/gems/bundler-1.2.3/lib/bundler/vendor/thor/invocation.rb:120:in `invoke_task'
/home/mywebsite/.rvm/gems/ruby-1.9.3-p362@global/gems/bundler-1.2.3/lib/bundler/vendor/thor.rb:275:in `dispatch'
/home/mywebsite/.rvm/gems/ruby-1.9.3-p362@global/gems/bundler-1.2.3/lib/bundler/vendor/thor/base.rb:408:in `start'
/home/mywebsite/.rvm/gems/ruby-1.9.3-p362@global/gems/bundler-1.2.3/bin/bundle:14:in `block in <top (required)>'
/home/mywebsite/.rvm/gems/ruby-1.9.3-p362@global/gems/bundler-1.2.3/lib/bundler/friendly_errors.rb:4:in `with_friendly_errors'
/home/mywebsite/.rvm/gems/ruby-1.9.3-p362@global/gems/bundler-1.2.3/bin/bundle:14:in `<top (required)>'
/home/mywebsite/.rvm/gems/ruby-1.9.3-p362@global/bin/bundle:19:in `load'
/home/mywebsite/.rvm/gems/ruby-1.9.3-p362@global/bin/bundle:19:in `<main>'
/home/mywebsite/.rvm/gems/ruby-1.9.3-p362@mywebsiter/bin/ruby_noexec_wrapper:14:in `eval'
/home/mywebsite/.rvm/gems/ruby-1.9.3-p362@mywebsiter/bin/ruby_noexec_wrapper:14:in `<main>'
There was an error in your Gemfile, and Bundler cannot continue.
Run Code Online (Sandbox Code Playgroud)
编辑 这是我的Gemfile:
source …Run Code Online (Sandbox Code Playgroud) 我正在使用rvm,我用rvm安装了ruby 2.0,但我需要卸载它以获得ruby 1.9.3.但我的终端做的很奇怪:
MacBook-Pro-Kuba:~ Kuba$ gem install bundler
Successfully installed bundler-1.3.5
Parsing documentation for bundler-1.3.5
1 gem installed
MacBook-Pro-Kuba:~ Kuba$ sudo rvm all do uninstall ruby
Preparing Uninstall...
Uninstall Began...
Uninstall Failed...
Reason: ErrorMissingBundle
Run Code Online (Sandbox Code Playgroud)
因此,你可以看到我肯定安装了捆绑器,并且它抛出了这个错误.我该怎么办?(我用山狮)