草庐IT

unset_bundler_env_vars

全部标签

ruby-on-rails - 找不到 RubyGem bundler

我已经为github克隆了diaspora,git://github.com/diaspora/diaspora.git我试着安装它。使用bundleinstall时发生错误。$bundleinstall/usr/local/lib/site_ruby/1.8/rubygems.rb:812:in`report_activate_error':CouldnotfindRubyGembundler(>=0)(Gem::LoadError)from/usr/local/lib/site_ruby/1.8/rubygems.rb:223:in`activate'from/usr/local/

ruby - 使用自定义 gem 源的 bundler 出现 "Could not find gem …"错误

在我的Gemfile中,我需要一个来自自定义源的gem,其中包含以下行:gem'very-secret-gem',source:'https://foo.example.com/'bundleinstall完成正常:$bundleinstallFetchingsourceindexfromhttps://foo.example.com/Fetchingsourceindexfromhttps://foo.example.com/Fetchinggemmetadatafromhttps://rubygems.org/........…Resolvingdependencies...…In

ruby - 运行 dependency.rb :247:in `to_specs' : Could not find bundler

当我运行bundle时,出现以下错误~/rails_apps/redmine]#bundle/usr/lib/ruby/site_ruby/1.8/rubygems/dependency.rb:247:in`to_specs':Couldnotfindbundler(>=0)amongst[RedCloth-4.2.9,ZenTest-4.8.2,actionmailer-2.3.14,actionpack-2.3.14,activerecord-2.3.14,activeresource-2.3.14,activesupport-2.3.14,cgi_multipart_eof_fi

ruby-on-rails - 绕过辅助开发 gem 的 bundler

在我的Rails项目的Gemfile中,我开始有辅助gem,例如“ruby-debug19”、“perftools.rb”或“irbtools”。所有这些实际上与项目无关,而是我本地开发设置的一部分。但是因为我使用的是bundler,所以我无法加载这些gems(即使它们是在系统范围内安装的),除非我将它们添加到Gemfile中。在我看来,这有点代码味道。例如,我希望能够在railsconsole中require'irbtools'而无需将“irbtools”添加到我的Gemfile。有没有办法将辅助gem排除在Gemfile之外,并且仍然能够在我需要它们时加载它们以进行调试、分析等?

ruby-on-rails - Capistrano bundler :install fails

我正在尝试使用Capistrano3.0将我的Rails应用程序部署到EC2实例中。我现在在运行“capproductiondeploy”或“capproductionbundler:install”时出现以下输出。DEBUG[5b379979]Running/usr/bin/enviftest!-d/var/www/app/current;thenecho"Directorydoesnotexist'/var/www/app/current'"1>&2;false;fionec2-75-101-200-185.compute-1.amazonaws.comDEBUG[5b379979

ruby - 为什么 #!/usr/bin/env ruby​​ 在 crontab 中不起作用?

我已经通过rvm(系统范围)安装了ruby​​,并通过普通控制台正常工作,并且我的rails程序在railsrunner和apache2+passenger上运行正常.现在在crontab中,我调用了railsrunnerfoo.bar,它放弃了,仔细检查我看到的日志:/usr/bin/env:ruby:Nosuchfileordirectory有人知道为什么/usr/bin/env在crontab中不起作用吗? 最佳答案 如果您通过rvm安装了ruby​​,则ruby​​可能不在/usr/bin中。取决于rvm的安装位置:bash

ruby-on-rails - 没有要加载的文件 -- bundler/setup

我正在尝试让Rails在Rackspace服务器上运行,不幸的是,它们不支持Rails。我在Ubuntu上使用Apache和Passenger(没有RVM)。当我访问服务器时,出现以下错误:nosuchfiletoload--bundler/setup回溯如下:/usr/lib/ruby/1.8/rubygems/custom_require.rb31ingem_original_require'/usr/lib/ruby/1.8/rubygems/custom_require.rb31inrequire'/rails/gradebook-attendance/config/boot.

ruby-on-rails - Rails 4 + Rspec + 设计 : undefined method 'env' in controller specs for sign_in a user

在我的spec_helper.rb中我添加了config.includeDevise::TestHelpers,:type=>:controller在:allhook之前的Controller规范中,我正在尝试使用此代码登录用户@request.env["devise.mapping"]=Devise.mappings[:user]user=FactoryGirl.create(:confirmed_user)sign_inuser并得到NoMethodError:undefinedmethod`env'fornil:NilClass。有什么想法吗? 最佳答

ruby - 没有这样的文件来加载 Rails 3 的 bundler 错误

我有一个Rails3应用程序准备好进行暂存。我还没有设置VPS主机。因为我计划在头几个月将所有内容都放在共享主机上。问题:cd我的应用程序捆绑检查结果:TheGemfile'sdependenciesaresatisfied乘客错误:Errormessage:nosuchfiletoload--bundlerExceptionclass:LoadError关于共享主机的令人沮丧的事情是我必须在config.ru上添加这些行:ENV['GEM_HOME']='/home/username/.gems'ENV['GEM_PATH']='$GEM_HOME:/usr/lib/ruby/gem

ruby - #!/usr/bin/env ruby​​ 在 cron 中找不到

我有一个简单的ruby​​脚本,hello.rb:#!/usr/bin/envrubyputs'hello'在命令行下运行正常:#/usr/local/src/hello/hello.rbhello但是,如果我把它放在cron中:*****/usr/local/src/hello/hello.rb>>/usr/local/src/hello/hello.log2>&1日志文件中有错误:/usr/bin/env:ruby:Nosuchfileordirectory/usr/bin/env:ruby:Nosuchfileordirectory.../usr/bin/env:ruby:Nos