0

Specifically, this commit has been merged into mongomapper master to fix a bug that is causing my application to crash:

https://github.com/mongomapper/mongomapper/pull/572

However, it hasn't been released in a new gem. Is it possible to include it prematurely or do I have to wait until it's released? I'm on heroku with a Gemfile.lock that specifies version.

My gemfile.lock currently reads:

mongo_mapper (0.13.0)
  activemodel (>= 3.0.0)
  activesupport (>= 3.0)
  mongo (~> 1.8)
  plucky (~> 0.6.5)
Kareem
  • 844
  • 2
  • 8
  • 15

2 Answers2

1

I don't know about Heroku, but if you want to use a git version of a gem that is not on Rubygems yet, you must add the git path to your Gemfile.

In your Gemfile change:

gem 'mongomapper'

To:

gem 'mongomapper', :git => 'https://github.com/mongomapper/mongomapper.git'

Or if you're on a more modern ruby, you can also use:

gem 'mongomapper', github: 'mongomapper/mongomapper'

And of course after that you must run bundle install or bundle update mongomapper.

Kimmo Lehto
  • 5,910
  • 1
  • 23
  • 32
0

Since the Ruby code isn't compiled, if you have the notes for that patch you can always manually add those changes to the lib directory of the mongomapper gem, although I can't advise against this enough - it's undesirable to change the source code, especially underneath an installed gem.

Once you go down this road you can't really count on any support for related issues until you are updated to a newer version or reverted to the original files.

cunninghamp3
  • 111
  • 5
  • Yeah I'd never do that unless it was an absolute last resort and a critical bug. – Kareem Jun 19 '14 at 18:17
  • The only time I've ever used it was when I had something that needed to be fixed in production immediately and could be reverted to an official fix within a few days. It's a terrible, terrible, nuclear option. – cunninghamp3 Jun 19 '14 at 18:20