Tag: gemfile

Rails:gem install与gemfile和bundle install

使用之间的确切区别是什么: 1- gem install [gemname] 和 2-将gem名称和版本添加到GemFile并运行bundle install ?

部署到heroku时Bundler gem兼容性问题。

部署到heroku时收到以下错误消息: Bundler could not find compatible version for gem “railties”: In Gemfile: rails (= 4.0.0) ruby depends on railties (= 4.0.0) ruby coffee-rails (= 4.0.0) ruby depends on railties (4.0.1.rc1) Failed to install gems via Bundler 的Gemfile source ‘https://rubygems.org’ ruby ‘1.9.3’ gem ‘rails’, ‘4.0.0’ gem ‘bcrypt-ruby’, ‘3.0.1’ gem ‘faker’, ‘1.1.2’ gem ‘will_paginate’, ‘3.0.4’ gem ‘will_paginate-bootstrap’ […]

捆绑安装问题

好的,每当我运行“捆绑安装”,我得到这个 Bundler could not find compatible versions for gem “railties”: In Gemfile: sass-rails (~> 3.1.0.rc8) depends on railties (~> 3.1.0) railties (3.1.0.rc8) 现在在我的gem文件中我有这个: source ‘http://rubygems.org’ gem ‘rails’, ‘3.1.0.rc8’ # Bundle edge Rails instead: # gem ‘rails’, :git => ‘git://github.com/rails/rails.git’ gem ‘sqlite3’ gem ‘json’ # Gems used only for assets and not required # in production […]

Bundler找不到gem“sass”的兼容版本

我正在使用中间人3.3.9和 gem ‘sass-rails’, ‘~> 4.0.3’ gem ‘bootstrap-sass’, ‘~> 3.3.1’ gem ‘bootstrap-timepicker-rails’ gem ‘sass’, ‘~> 3.2.19’ 当我运行bundle install时,我收到此错误: Bundler could not find compatible versions for gem “sass”: In Gemfile: middleman (~> 3.3.9) ruby depends on sass (= 3.4.0) ruby sass (3.2.19) 我怎么能通过这个?

生产轨道部署中的两个版本的gem

我认为我的生产中的gemfile存在一些问题,因为它与我的开发不同,我认为这导致我的部署(Capistrano)失败,至少在捆绑安装时间 发展 actionmailer (3.2.3) actionpack (3.2.3) activemodel (3.2.3) activerecord (3.2.3) activeresource (3.2.3) activesupport (3.2.3) arel (3.0.2) bcrypt-ruby (3.0.1) builder (3.0.4) bundler (1.3.4) capistrano (2.14.2, 2.12.0) climate_control (0.0.3) cocaine (0.5.1, 0.2.1) coffee-rails (3.2.2) coffee-script (2.2.0) coffee-script-source (1.6.2, 1.3.3) commonjs (0.2.6) daemon_controller (1.1.2, 1.0.0) daemons (1.1.9) database_cleaner (0.9.1, 0.8.0) devise (2.2.3) diff-lcs (1.2.2, 1.1.3) erubis (2.7.0) eventmachine […]

Gemfile中的环境变量

我在Gemfile中使用环境变量时遇到问题。 我正在尝试使用API​​密钥从私有Github存储库加载gem: auth = ENV[‘SECRET_GIT’] gem ‘foobar’, git: “https://#{auth}:x-oauth-basic@github.com/Foo/Bar.git” 但是如果我puts我的ENV[‘SECRET_GIT’]变量放在其中,那么它就没有了。 我可以这样做因为这些(特别是第一个): – https://devcenter.heroku.com/articles/bundler-configuration#gem-source-username-and-password – https://stackoverflow.com/a/7338154/5353193 – 使用Gemfile中的环境变量部署到Heroku Bundler版本1.14.6 ruby2.4.0p0 谢谢你的帮助 编辑 我想在我的本地环境中这样做,我想在heroku上做这个没有问题。

Rails gemfile编辑

我正在启动一个Rails教程,告诉我在创建一个新的演示应用程序时编辑gemfile: source ‘https://rubygems.org’ gem ‘rails’, ‘3.2.3’ # Bundle edge Rails instead: # gem ‘rails’, :git => ‘git://github.com/rails/rails.git’ gem :development do gem ‘sqlite3’, ‘1.3.5’ end # Gems used only for assets and not required # in production environments by default. group :assets do gem ‘sass-rails’, ‘3.2.4’ gem ‘coffee-rails’, ‘3.2.2’ # See https://github.com/sstephenson/execjs#readme for more supported runtimes […]

尝试执行任何以“rails”开头的命令会产生“找不到Gemfile”

我正在尝试安装新的rails应用程序。 我已经在我的机器上安装了几个rails应用程序,一切正常。 $ rails new app Could not locate Gemfile 然后我想我会运行一个跟踪来弄清楚发生了什么,因为你不希望此时有一个Gemfile ,因为通常上面的命令会在一个名为app的目录中创建一个全新的rails应用app 。该Gemfile包含的Gemfile 。 $ rails new app –trace Could not locate Gemfile 因此,我尝试通过此详细指南重新安装计算机上的所有内容: http://railsapps.github.com/installing-rails.html#gems 在前20个步骤之后,我得到了这个命令: $ rake -v Could not locate Gemfile 我假设某些地方的设置已关闭,但我看不到任何关闭。 这是我的rvm设置: $ rvm version rvm 1.18.10 (latest) by Wayne E. Seguin , Michal Papis [https://rvm.io/] $ rvm list rvm rubies jruby-1.6.7 […]

“您的Ruby版本是1.9.3,但您的Gemfile指定为1.9.3-p194”

RVM不会让我运行bundle因为它认为我的Ruby版本与我的Gemfile所说的不同,但它不是: $ rvm list rvm rubies => ruby-1.9.3-p194 [ x86_64 ] ruby-1.9.3-p429 [ x86_64 ] * ruby-2.0.0-p195 [ x86_64 ] # => – current # =* – current && default # * – default $ ruby -v ruby 1.9.3p194 (2012-04-20 revision 35410) [x86_64-darwin13.0.0] 的Gemfile: ruby ‘1.9.3-p194’ 但是之后: $ bundle install Your Ruby version is 1.9.3, […]

Capistrano无法在应用程序部署中找到Gemfile错误

我正在尝试将我的Rails应用程序部署到生产服务器,我决定使用本指南 + RVM将其部署到DigitalOcean。 要部署我使用以下命令: cap production deploy 但是,它在某些需要gemfile的部分失败了。 这是部署失败的日志: DEBUG[323dfd0e] Command: cd /home/deploy/zwiadowcy/releases/20140628164657 && ~/.rvm/bin/rvm default do bundle install –binstubs /home/deploy/zwiadowcy/shared/bin –path /home/deploy/zwiadowcy/shared/bundle –without development test –deployment –quiet DEBUG[323dfd0e] Could not locate Gemfile cap aborted! SSHKit::Runner::ExecuteError: Exception while executing on host my_ip_address: bundle exit status: 10 bundle stdout: Nothing written bundle stderr: Nothing written 我的gemfile已包含所有必需的东西: […]