Tag: bundle

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 […]

Ruby on Rails – Carrierwave获取图像尺寸宽度和高度

我需要知道当前载波实例的宽度和高度 例如: image_tag image.photo_url,:width => image.photo.width, :height => image.photo.height 但问题是image.photo.width和image.photo.height不起作用。 有任何想法吗 ?

bundle exec不能与crontab一起使用

我正在尝试使用crontab执行以下shell脚本: #!/bin/sh cd /mnt/voylla-production/current bundle exec rake maintenance:last_2_days_orders bundle exec rake maintenance:send_last_2_days_payment_dropouts crontab条目是 0 16 * * * /mnt/voylla-production/releases/20131031003111/voylla_scripts/cj_4pm.sh 我在邮件中收到以下错误消息: /mnt/voylla-staging/current/voylla_scripts/cj_4pm.sh: line 3: bundle: command not found /mnt/voylla-staging/current/voylla_scripts/cj_4pm.sh: line 4: bundle: command not found 我手动运行命令时没有收到错误。 不知道这里发生了什么。 请有人指出。 谢谢

如何在Rails 3.1中创建项目期间删除“bundle install”命令?

我正在创建一个新项目: rails new ggg –database=mysql 并得到以下输出: create create README create Rakefile create config.ru create .gitignore create Gemfile create app create app/assets/images/rails.png create app/assets/javascripts/application.js create app/assets/stylesheets/application.css create app/controllers/application_controller.rb create app/helpers/application_helper.rb create app/mailers create app/models create app/views/layouts/application.html.erb create app/mailers/.gitkeep create app/models/.gitkeep create config create config/routes.rb create config/application.rb create config/environment.rb create config/environments create config/environments/development.rb create config/environments/production.rb create config/environments/test.rb […]

未找到捆绑命令Windows x64

我刚刚用Heroku Toolbelt安装了ruby,探测器就是当我进行bundle install它会给我这个错误: sh.exe”: /c/Program Files (x86)/ruby-1.9.3/bin/bundle: “c:/Program: bad interpreter: No such file or directory 根据这个问题找不到Bundle命令。 坏解释我应该改变PATH,但我不知道怎么做,我已经改变了windows PATH环境变量,甚至改为C:\ ruby​​-1.9.2 \ bin我得到了类似的错误: sh.exe”: /c/ruby-1.9.3/bin/bundle: “c:/Program: bad interpreter: No such file or directory 当我尝试重新安装Toolbelt时,我将install direcotry更改为c:\但仍然向导在Program Files(x86)目录中安装git和ruby文件夹。 有什么建议?

无法在任何gem来源中找到gem’logstash-devutils(> = 0)ruby’

我只是想学习编写example-output-plugin,请按照以下页面操作: http://www.elastic.co/guide/en/logstash/current/_how_to_write_a_logstash_output_plugin.html#_clone_and_test_4 当我在〜/ logstash-output-example文件夹中键入“bundle install”时,我得到错误: Could not find gem ‘logstash-devutils (>= 0) ruby’ in any of the gem sources listed in your Gemfile or installed on this machine. 似乎gem’logstash-devutils(> = 0)ruby’错过了,但当我输入“sudo gem install logstash-devutils”时,我收到错误 ERROR: Could not find a valid gem ‘logstash-devutils’ (>= 0) 原因如下: Found logstash-devutils (0.0.12), but was for platform java 别人可以帮帮我吗? 环境:MAC […]

无法在Windows上运行捆绑软件更新

每当我在Windows 8.1上运行bundle update或bundle install时,我都无法从github更新/安装gem。 我可以安装其他gem,如uglifier,但它不适用于github gems。 例如,将它放在Gemfile中 group :development, :test do gem ‘rspec-rails’, ‘2.13.1’ gem ‘spork-rails’, github: ‘sporkrb/spork-rails’ end 导致错误: Retrying source fetch due to error (2/3): You need to install git to be able to use gems from git repositories. 问题是我肯定安装了git。 我是从Git Bash运行的,并在一个项目中工作,我正在克隆,拉动和使用Git。 那么为什么捆绑更新/安装一直坚持我没有安装git? 如何修复它并使捆绑安装工作?