Tag: 捆绑

为什么’bundle install –without production’命令在更新后不需要’–without production’?

为什么不是第二个命令 $ bundle install 不需要 –without production (因为这是它在教程中的用法,所以我认为它是正确的)不需要它背后发生了什么/推理? 来自http://ruby.railstutorial.org/chapters/a-demo-app#sec-demo_users_resource $ bundle install –without production $ bundle update $ bundle install

find_spec_for_exe’:找不到gem bundler(> = 0.a)(Gem :: GemNotFoundException)

我使用sudo bundle install ,这可能是问题的原因? 我现在有: gem -v 2.6.14 ruby -v ruby 2.3.5p376(2017-09-14修订版59905)[x86_64-darwin15] jekyll -v jekyll 3.6.2 bundle -v Bundler version 1.16.0.pre.3 尝试运行bundle exec jekyll serve或jekyll serve时,我收到以下错误 /Users/myusername/.rvm/rubies/ruby-2.3.5/lib/ruby/site_ruby/2.3.0/rubygems.rb:271:in find_spec_for_exe’: can’t find gem bundler (>= 0.a) (Gem::GemNotFoundException) from /Users/myusername/.rvm/rubies/ruby-2.3.5/lib/ruby/site_ruby/2.3.0/rubygems.rb:299:in activate_bin_path’中的find_spec_for_exe’: can’t find gem bundler (>= 0.a) (Gem::GemNotFoundException) from /Users/myusername/.rvm/rubies/ruby-2.3.5/lib/ruby/site_ruby/2.3.0/rubygems.rb:299:in gems / ruby​​-2.3.5 / bin / bundle:23:in ‘ […]

为什么需要“require’bundler / setup’”?

在我见过的几乎所有Sinatra例子中,尽管它做了什么,它总是有以下两行: require ‘rubygems’ require ‘bundler/setup’ 在大多数示例中,删除’bundler / setup’需要似乎没有破坏效果,所以我很困惑何时/何时需要包含它。 我讨厌使用的东西而不知道它在那里的确切原因,所以我希望有人可以解释为什么我需要两条线和他们做什么?

在Gemfile中设置环境,以便根据自定义文件捆绑安装/更新

嗨,我建立了一个sinatra应用程序,捆绑的主要文件如下, 的environment.rb require ‘sinatra’ require ‘sequel’ ENV[‘RACK_ENV’] = ‘development’ configure :production do #do something end configure :development, :test do #do something end 的Gemfile gem ‘sinatra’ gem ‘sequel’ gem ‘pg’, :group => :production gem ‘sqlite3′, :group => [:development, :test] 那么,如何在我的environment.rb文件中基于ENV [‘RACK_ENV’]安装bundle。

使用bundler以编程方式确定gem的路径

我知道你能做到 bundle show gem_name 展示一些gem的路径。 你如何使用Bundler对象从代码中做到这一点?

无法运行Jenkins Build – bundle:“找不到命令”

我目前正在尝试为我的一些黄瓜任务运行jenkins构建。 我所有的gem都是使用Bundler安装的。 gem存储在vendor文件夹中。 但是,当我尝试在执行shell构建步骤中运行bundle install –deployment时,我收到以下错误: Started by user anonymous Building in workspace /Users/Shared/Jenkins/Home/jobs/cukes/workspace [workspace] $ /bin/sh -xe/var/folders/zz/zyxvpxvq6csfxvn_n0000004000001/T/hudson4461284045505361460.sh + bundle install –deployment /var/folders/zz/zyxvpxvq6csfxvn_n0000004000001/T/hudson4461284045505361460.sh: line 2: bundle: command not found Build step ‘Execute shell’ marked build as failure Finished: FAILURE 这真让我抓狂! 它在我的本地机器上运行没有问题。 jenkins为什么看不到我的gem? 任何帮助都会很棒! 干杯,乔恩

如何在Mavericks上修复Gemfile中的libv8错误?

当我运行bundle install我得到了 An error occurred while installing libv8 (3.11.8.17), and Bundler cannot continue. Make sure that `gem install libv8 -v ‘3.11.8.17’` succeeds before bundling. Libv8依赖于therubyracer和therubyracergem。 我在3.11.8.17上锁定了我的Gemfile.lock libv8 gem 但我发现我可以将它降级到3.3.10.4 bundle install / update:libv8(therubyracer)安装失败(带有本机扩展) 怎么做? 我也发现工作3.11.8.17 gem但不知道如何在我的系统上实现它。 https://github.com/cowboyd/libv8/issues/107#issuecomment-26146673

bundle exec是否需要’bundler / setup’等效?

这些事情完全相同吗? 用bundle exec ruby foo.rb启动ruby进程 require “bundler/setup”作为foo.rb的第一行

没有这样的文件加载 – 带有Passenger的Rails 3.2中的bundler / setup

我在乘客的apache2上运行vserver。 使用RVM进行ruby。 Ruby版本 – > 1.9.3p194 Rails版本 – > 3.2.3由Apache虚拟主机配置设置… 现在,当我将URL输入浏览器时,会显示乘客错误页面: no such file to load — bundler/setup 我不知道现在该做什么。 有人能帮我吗?

‘require bundler’和’require bundler / setup’之间的区别

我用的时候 require ‘bundler/setup’ 我得到Bundler.with_clean_env不受支持。 但是,当我改变它 require ‘bundler’ 它支持Bundler.with_clean_env 。 这里出现的混乱是需要’bundler’和’bundler/setup’之间的区别是什么?