Questions tagged [gemfile]

Gemfile - A format for describing gem dependencies for Ruby programs. A Gemfile describes the gem dependencies required to execute associated Ruby code.

Gemfiles are a format for describing what gems are required by a Ruby program in order to successfully run.

See also

712 questions
10
votes
4 answers

is it desirable to remove Gemfile.lock?

I'm on Ubuntu 10.04, the app that I have to push to Heroku has a Gemfile.lock, this app was developed by another programmer. When I use bundle install command, this install the necessary gems for run the app with rails s. Does bundle install take…
Antonio Morales
  • 1,044
  • 2
  • 16
  • 35
10
votes
1 answer

How to use a local gem in console with bundled environment

I want to customize my development environment with a few extra gems. I am using bundler with rails 3.0.x. I have those extra gems in my local system and i dont want to add them into my Gemfile. How can i by pass bundler and require these gems in my…
AshwinKumarS
  • 1,303
  • 10
  • 13
9
votes
2 answers

Use non released Rails version from Git (possibly by commit number)

I'm trying to use Passenger to host my rails app, but as noted in this issue, logging is s little whacky in rails 3.2.1. Someone has released a commit (that has been pulled into the main branch) with a fix. How can I tell my app to use the main…
Tyler DeWitt
  • 23,366
  • 38
  • 119
  • 196
9
votes
5 answers

How to reduce heroku slug size?

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…
jbescoyez
  • 1,393
  • 9
  • 17
9
votes
3 answers

Cannot add platform to Gemfile.lock using bundle lock

I am trying to push a project to Heroku for the first time using git push heroku master. However, I end up getting the following error: Your bundle only supports platforms ["arm64-darwin-21"] but your local platform is x86_64-linux. Add the current…
Sebastian
  • 145
  • 1
  • 7
9
votes
2 answers

Rails app: using a gem vs. including source with Twitter Bootstrap

I've gone through my app and am having trouble finding where exactly the Twitter Bootstrap source goes when I include it through a gem. If I wanted to view the Bootstrap .css for example, how do I find it? The alternative, as I understand, to…
MCP
  • 4,436
  • 12
  • 44
  • 53
8
votes
4 answers

How do I upgrade from Rails 4.2.7.1 to Rails 5.0.0.1?

I’m using 4.2.7.1 and I want to upgrade to Rails 5.0.0.1. So I adjusted my Gemfile like so # Bundle edge Rails instead: gem 'rails', github: 'rails/rails' gem 'rails', '~> 5.0.0.1’ # Use Puma as the app server gem 'puma', '~> 3.0' # Use SCSS for…
Dave
  • 15,639
  • 133
  • 442
  • 830
8
votes
3 answers

You have already activated spring 1.3.6, but your Gemfile requires spring 1.3.3. (Gem::LoadError)

I encountered the same issue today with a suggestion: Prepending bundle exec to your command may solve this. Prepending bundle exec didn't help (I was doing that already). spring stop & spring restart did not help. I need to do : bundle update…
Jaswinder
  • 1,455
  • 14
  • 27
8
votes
1 answer

Rails : gem install vs. gemfile & bundle install

What is the exact difference between using: 1- gem install [gemname] and 2- add gem name & version to GemFile and run bundle install ?
user2078158
7
votes
1 answer

how can I go about using the Gemfile's :path argument to reference local gems in development with a value that is OS agnostic?

I am writing a Gemfile to help with the development of a few gems my team is creating. I know that the Gemfile allows the use of the :path argument to reference local directories that contain a .gemspec file: gem "my_gem", :path =>…
linusthe3rd
  • 3,455
  • 3
  • 28
  • 43
7
votes
2 answers

Rails 3.1.2 - Bundler could not find compatible versions for gem "railties"

I am trying to install the new version of the twitter-bootstrap-rails gem (v2), but getting the error above. This is how my Gemfile looks: source 'http://rubygems.org' gem 'rails', '3.1.2' # Bundle edge Rails instead: # gem 'rails', :git =>…
user984621
  • 46,344
  • 73
  • 224
  • 412
7
votes
2 answers

Platform specific gems for autotest with bundler

In the rails project I'm working on I inserted support for rspec, cucumber and autotest with this Gemfile (partial) gem 'rspec-rails' gem 'cucumber-rails' gem 'autotest-standalone' gem 'autotest-rails-pure' gem 'zentest-without-autotest' however in…
Fabio
  • 18,856
  • 9
  • 82
  • 114
7
votes
4 answers

Gem not loading: NameError (uninitialized constant) | But gem works in local path

I got a new machine and installed rbenv fresh (I always used rvm before). This gem now won't load in my app. I made no code changes. The only difference between now and then is rbenv. Loading development environment (Rails 5.2.1) irb(main):001:0>…
iamse7en
  • 609
  • 8
  • 21
7
votes
2 answers

Is it possible to override gemfile for local development?

We have a Gemfile currently in our git repository. However, there's a gem I use only locally in my environment (my team doesn't use it). In order to use it, I have to add it to our Gemfile, but every time I check out to our master/dev main branch, I…
luispcosta
  • 542
  • 1
  • 6
  • 20
7
votes
3 answers

Could not find gem 'pg (= 0.12.4) ruby' in any of the gem sources listed in your Gemfile or available on this machine

I'm trying to run the following for on my Kali box, see error. root@kali:~# ruby /usr/share/metasploit-framework/tools/nasm_shell.rb Could not find rake-10.4.2 in any of the sources Run `bundle install` to install missing gems. I then run bundle…
rebecca oliveras
  • 71
  • 1
  • 1
  • 2