Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Custom Ruby Gem in Gemfile on Heroku

I've modified a Gem that I use in my Rails app, and need to use it on Heroku. Is there a way to upload the modified Gem to Heroku within my app and specify a custom path in my Gemfile?

like image 676
Scott Avatar asked Jul 23 '11 11:07

Scott


People also ask

How do you install gems you added to your Gemfile?

run the command bundle install in your shell, once you have your Gemfile created. This command will look your Gemfile and install the relevant Gems on the indicated versions. The Gemfiles are installed because in your Gemfile you are pointing out the source where the gems can be downloaded from.

How do I use Gemfile in Ruby?

A Gemfile describes the gem dependencies required to execute associated Ruby code. Place the Gemfile in the root of the directory containing the associated code. For instance, in a Rails application, place the Gemfile in the same directory as the Rakefile .

Is Gemfile a Ruby file?

A Gemfile is a file we create which is used for describing gem dependencies for Ruby programs. A gem is a collection of Ruby code that we can extract into a “collection” which we can call later. It lets you specify which gems you want to use, and which versions of these gems to use.

What is gem in Gemfile?

A Gemfile is a file that is created to describe the gem dependencies required to run a Ruby program. A Gemfile should always be placed in the root of the project directory.


2 Answers

You can place custom gems in the vendor directory and then specify them in your Gemfile:

gem 'gemname', '1.0', :path => 'vendor/gemname'

like image 182
NARKOZ Avatar answered Oct 02 '22 18:10

NARKOZ


in Gemfile: gem 'blah', :git => 'https://github.com/XXX/YYY.git'

like image 36
fuzzyalej Avatar answered Oct 02 '22 18:10

fuzzyalej