gemfile

How to reduce heroku slug size?

浪子不回头ぞ 提交于 2019-12-05 03:36:23
My slug size is 89.5MB which is huge. However the repository size is quite small: $ du -hsc 8.0M . 8.0M total Following this blog post: http://dazedthots.blogspot.com/2011/07/reducing-slug-size-heroku.html , there is a bug on Heroku with changing Gemfiles. Mine has changed several times including git dependencies but now, the only git dependency is "rails_admin". See below: source 'http://rubygems.org' gem 'rails', '~> 3.1.0' gem 'rails-i18n', '~> 0.1.3' gem 'pg', '~> 0.11.0' gem 'rake', '~> 0.8.7' gem 'thin', '~> 1.2.11' gem 'heroku', '~> 2.4.0' gem 'squeel', '~> 0.8.6' gem 'devise', '~> 1.4

Why is 'jQuery-Rails' often outside of the asset group

核能气质少年 提交于 2019-12-05 01:25:51
Why is it that I often see gem 'jquery-rails outside of the :assets group? group :assets do gem 'sass-rails', " ~> 3.1.0" gem 'coffee-rails', " ~> 3.1.0" gem 'uglifier' end gem 'jquery-rails' Will there be buggy behavior if I put it inside? Thanks! The jquery-rails gem provides some test helpers also. So perhaps for that reason people prefer to put it outside the :assets group. However, the :assets group is included in development and testing environment, so you should be perfectly safe to place jquery-rails in your :assets group if you like. Just make sure you precompile your assets before

Gemfile.lock contains merge conflicts

梦想的初衷 提交于 2019-12-05 00:29:44
I just ran git push origin master and got this error after trying to run rails s : Your Gemfile.lock contains merge conflicts. Run `git checkout HEAD -- Gemfile.lock` first to get a clean lock. Neither git checkout HEAD --Gemfile.lock bundle , bundle install , nor bundle update are helping to resolve this issue. Does anyone know what to do to fix this? Gemfile: source 'https://rubygems.org' ruby "2.1.2" gem 'devise' gem 'twilio-ruby', '~> 3.12' # Bundle edge Rails instead: gem 'rails', github: 'rails/rails' gem 'rails', '4.2.0.beta2' # Use postgresql as the database for Active Record gem 'pg'

You have already activated rack 1.6.0, but your Gemfile requires rack 1.6.4

早过忘川 提交于 2019-12-04 09:08:18
问题 Similar to problem with rack 1.3.2. You have already activated rack 1.3.2, but your Gemfile requires rack 1.2.3 -- I'm experiencing You have already activated rack 1.6.0, but your Gemfile requires rack 1.6.4 when attempting to run Rails (4.2) in production with Puma and Nginx. bundle update rake nor rm Gemfile.lock && bundle install seem to help, the only solution I have so far is manually changing rack (1.6.4) to rack (1.6.0) in Gemfile.lock. 回答1: you need to uninstall one version of rack

How to bundle install via a CLI/Ruby system call?

a 夏天 提交于 2019-12-04 08:30:50
Is it possible to run bundle install from a ruby system call? I'm trying to install gems and run tests for a project under another path... For example the command is: "cd /some/other/project && bundle install && gem list && rspec spec" Ideally I want to just run the tests via a rake file in one project whilst making sure the relevant gems for that project are install. The cd seems to be working correctly, if I run: "cd /some/other/project && pwd" It does give the correct path. But if I do bundle install && gem environment, it seems to install the gems for the current folder and doesn't use the

When do you need a require in a rails Gemfile?

核能气质少年 提交于 2019-12-04 03:17:47
问题 In my gemfile I have things like: gem 'net-sftp', '2.1.1', :require => 'net/sftp' gem 'backup', '3.0.27' gem 'watu_table_builder', :require => 'table_builder' gem 'browser', '0.1.6' When in a Gemfile do you need a require? I've also found things like :require => false . Help? 回答1: If you omit the :require option, by default Bundler will attempt to require the gem by using the standard name-to-file conversion rule: dashes are considered namespace separators and underscore classname separators

Bundler cannot find a version of a gem, but gem install with the same name works

爱⌒轻易说出口 提交于 2019-12-03 16:16:32
问题 I've created a gem, and for some reason this one keeps bugging me, and refuses to install properly through bundler. Here's the Gemfile : source 'https://rubygems.org' gem 'rails', '3.2.9' gem "switch_access-rails", "~> 1.1.6" bundle install fails with: Could not find gem 'switch_access-rails (~> 1.1.6) ruby' in the gems available on this machine. This works: gem install switch_access-rails -v 1.1.6 And the gem is here on rubygems: https://rubygems.org/gems/switch_access-rails/versions/1.1.6 I

Set ruby version in Gemfile

僤鯓⒐⒋嵵緔 提交于 2019-12-03 15:27:52
问题 I can set ruby version in Gemfile as follows: ruby '2.0.0' But what if I want to have a particular version as 2.0.0-p353 ? When I add it to Gemfile , I get: Your Ruby version is 2.0.0, but your `Gemfile` specified 2.0.0-p353 Is it even possible to set a particular version? 回答1: In Version 1.3 and earlier of Bundler you couldn’t specify the patchlevel: The ruby directive explicitly leaves out the ability to specify a patch level. Ruby patches often include important bug and security fixes and

What can I do about a Bundler::GemfileNotFound error?

寵の児 提交于 2019-12-03 11:45:01
问题 I just installed bundler-1.3.3 successfully. However, when I try to run bundle install I get Bundler::GemfileNotFound What is wrong here? 回答1: cd into a directory that has a Gemfile 回答2: In my experience, this will occur when your code is not executing in the directory you think it is (hence the previous answer), or the directory containing the Gemfile has been moved or deleted. I experienced this when I had been running unicorn on a server running an app that had been deployed with

Set ruby version in Gemfile

南笙酒味 提交于 2019-12-03 05:58:21
I can set ruby version in Gemfile as follows: ruby '2.0.0' But what if I want to have a particular version as 2.0.0-p353 ? When I add it to Gemfile , I get: Your Ruby version is 2.0.0, but your `Gemfile` specified 2.0.0-p353 Is it even possible to set a particular version? In Version 1.3 and earlier of Bundler you couldn’t specify the patchlevel : The ruby directive explicitly leaves out the ability to specify a patch level. Ruby patches often include important bug and security fixes and are extremely compatible. This changed in version 1.5, the docs now say : In the ruby directive,