尝试推送狂欢沙箱车来测试我要使用的扩展时,我遇到了这个错误.
我的Gemfile
gem 'spree_flexi_variants', :git=>'git@github.com:jsqu99/spree_flexi_variants.git', :branch => 'pre-deface-stable'
Run Code Online (Sandbox Code Playgroud)
heroku的输出推送:
julio@ubuntu:~/rails/sandboxcart $ git push heroku master
Counting objects: 502, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (475/475), done.
Writing objects: 100% (502/502), 2.63 MiB | 458 KiB/s, done.
Total 502 (delta 44), reused 0 (delta 0)
-----> Heroku receiving push
-----> Ruby/Rails app detected
-----> Detected Rails is not set to serve static_assets
Installing rails3_serve_static_assets... done
-----> Configure Rails 3 to disable x-sendfile
Installing rails3_disable_x_sendfile... done
----- …Run Code Online (Sandbox Code Playgroud) 嗨,我建立了一个sinatra应用程序,捆绑的主要文件如下,
的environment.rb
require 'sinatra'
require 'sequel'
ENV['RACK_ENV'] = 'development'
configure :production do
#do something
end
configure :development, :test do
#do something
end
Run Code Online (Sandbox Code Playgroud)
的Gemfile
gem 'sinatra'
gem 'sequel'
gem 'pg', :group => :production
gem 'sqlite3', :group => [:development, :test]
Run Code Online (Sandbox Code Playgroud)
那么,如何让我的environment.rb文件中的ENV ['RACK_ENV']安装bundle.
的Gemfile:
source "http://rubygems.org"
gem "nokogiri", :git => "git://github.com/tenderlove/nokogiri.git"
Run Code Online (Sandbox Code Playgroud)
运行时bundle,会发生以下错误:
Fetching git://github.com/tenderlove/nokogiri.git
Unfortunately, a fatal error has occurred. Please see the Bundler troubleshooting documentation at http://bit.ly/bundler-issues. Thanks!
C:/Ruby193/lib/ruby/gems/1.9.1/gems/bundler-1.1.4/lib/bundler/source.rb:592:in ``': No such file or directory - git clone "git://github.com/tenderlove/nokogiri.git" "C:/Ruby193/lib/ruby/gems/1.9.1/cache/bundler/git/nokogiri-d4bf05cb9e65f144f074351e5ebe3a0e44c00952" --bare --no-hardlinks (Errno::ENOENT)
Run Code Online (Sandbox Code Playgroud)
我该如何解决?
它不仅可以与这颗宝石重现,还可以与其他宝石重现:黄瓜,水豚
我用的是Windows.
我收到了一大堆这些错误:
bundle exec rake db:migrate
/Users/robpaulo/gems/gems/bcrypt-ruby-3.0.1/lib/bcrypt_ext.bundle: [BUG] Segmentation fault
ruby 1.9.3p327 (2012-11-10 revision 37606) [x86_64-darwin10.8.0]
Run Code Online (Sandbox Code Playgroud)
在我的所有Ruby版本上,我想看看我的宝石是否混乱或是否必须重新安装rbenv.我正在运行Snow Leopard有没有办法卸载bundler以便我可以重新安装它我试过Bundler网站并bundle -h在控制台中调用,没有帮助.
然后我试着bundle implode疯狂地笑了.我也试过bundle uninstall哪个不起作用.
我正在使用bundler来要求我项目中的所有宝石.但是,它不适用于yaml/logger.
如果我将gem'yaml'添加到我的gemfile中,并运行bundle install,我得到:
Could not find gem 'yaml (>= 0) ruby' in the gems available on this machine.
Run Code Online (Sandbox Code Playgroud)
但我通常要求它很好.我究竟做错了什么?
谢谢
输出:
Run Code Online (Sandbox Code Playgroud)Counting objects: 96, done. Delta compression using up to 4 threads. Compressing objects: 100% (73/73), done. Writing objects: 100% (73/73), 7.87 KiB | 0 bytes/s, done. Total 73 (delta 56), reused 0 (delta 0) -----> Ruby/Rails app detected -----> Using Ruby version: ruby-1.9.3 -----> Installing dependencies using Bundler version 1.3.2 Fixing nokogiri install. Clearing bundler cache. See https://github.com/sparklemotion/nokogiri/issues/923. Running: bundle install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin --deployment You are trying to install in deployment mode after changing your …
我在这个网站后面安装了一些厨师依赖:
https://learnchef.opscode.com/starter-use-cases/multi-node-ec2/
我到了bundle install部分,这是我的Gemfile的样子:
source 'https://rubygems.org'
gem 'berkshelf'
gem 'chef'
gem 'knife-ec2'
Run Code Online (Sandbox Code Playgroud)
当我尝试运行bundle install --path vendor时出现此错误:
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
...
libiconv is missing. please visit http://nokogiri.org/tutorials/installing_nokogiri.html for help with installing dependencies.
...
An error occurred while installing nokogiri (1.6.0), and Bundler cannot continue.
Make sure that `gem install nokogiri -v '1.6.0'` succeeds before bundling.
Run Code Online (Sandbox Code Playgroud)
我去了nokogiri网站,我能够按照指示成功安装nokgiri 1.6.0与自制软件.9.5:
nokogiri --version
WARNING: Nokogiri was built against LibXML version 2.9.1, but has dynamically loaded 2.8.0
# Nokogiri (1.6.0)
Run Code Online (Sandbox Code Playgroud)
当我再次尝试运行bundle …
我正在尝试使用capistrano来部署和捆绑我的rails应用程序.当我运行cap部署 - 或者更具体地说
bundle exec cap staging bundler:install --trace
Run Code Online (Sandbox Code Playgroud)
我似乎对以下堆栈跟踪有永久性错误.
** Invoke staging (first_time)
** Execute staging
** Invoke load:defaults (first_time)
** Execute load:defaults
** Invoke bundler:map_bins (first_time)
** Execute bundler:map_bins
** Invoke bundler:install (first_time)
** Execute bundler:install
DEBUG [bd567504] Running /usr/bin/env if test ! -d /var/www/TMC/current; then echo "Directory does not exist '/var/www/TMC/current'" 1>&2; false; fi on 162.243.225.14
DEBUG [bd567504] Command: if test ! -d /var/www/TMC/current; then echo "Directory does not exist '/var/www/TMC/current'" 1>&2; false; fi
DEBUG [bd567504] Finished …Run Code Online (Sandbox Code Playgroud) 在Gemfile中,可以引用github上托管的gem:
gem 'spree', github: 'spree/spree', branch: '2-3-stable'
gem 'spree_gateway', github: 'spree/spree_gateway', ref: '2-1-stable'
Run Code Online (Sandbox Code Playgroud)
该的Gemfile手册页介绍了git的三个属性:分支,REF和标签.ref和之间有什么区别branch?Bundler如何根据属性不同地处理gem?
这尤其有趣,因为您一次只能使用其中一个属性.
我正在使用Ubuntu 15.10。这是我在终端中编写的代码
gem install bundler
ERROR: While executing gem ... (Gem::FilePermissionError)
You don't have write permissions for the /var/lib/gems/2.1.0 directory.
Run Code Online (Sandbox Code Playgroud)
为什么要尝试在那里安装它?当然,它没有权限将其安装在根目录中。如果我像这样尝试相同的命令,sudo gem install bundler它将起作用。但是不应将其安装为sudo,在创建新的Rails应用程序时会给我带来问题。我该怎么办?