Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to edit a gem at Heroku

I'm using 'rails3-jquery-autocomplete' gem, but it doesn't have multi column search, but there is a fork that does it ( more details at: https://github.com/crowdint/rails3-jquery-autocomplete/pull/95).

Now I need to deploy to Heroku but it will install the official gem. How can I edit it? Or if it's not possible, how can I import a gem to the application?

Thanks.

like image 290
Jirico Avatar asked Mar 26 '12 20:03

Jirico


People also ask

How to change Ruby version in Heroku?

Selecting a version of Ruby You'll need to install bundler 1.2. x or above to use the ruby keyword and bundler 1.13. x or above to use a Ruby version specifier. You can use the ruby keyword in your app's Gemfile to specify a specific version of Ruby.

How do I set gem version in Gemfile?

There are several ways to specify gem versions: Use a specific version: gem "name-of-gem", "1.0" . You can find specific versions on Rubygems.org (provided that's the source you”re using) by searching for your gem and looking at the “Versions” listed. Use a version operator: gem "name-of-gem", ">1.0" .

What is a gemlock file?

The Gemfile. lock allows you to specify the versions of the dependencies that your application needs in the Gemfile , while remembering all of the exact versions of third-party code that your application used when it last worked correctly. By specifying looser dependencies in your Gemfile (such as nokogiri ~> 1.4.


1 Answers

you can use the fork by specifying the :git path in your Gemfile declaration

something like

gem "_GEM_NAME_", :git => "git://git/repository.git"

your other option would be to just vendor the gem inside your into a directory like vendor/gems/_gem_name and then you could use the :path option as well

gem "_GEM_NAME_", :path => "vendor/gems/_gem_name"
like image 67
cpjolicoeur Avatar answered Sep 22 '22 18:09

cpjolicoeur