Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Heroku NameError: uninitialized constant MongoMapper::Railtie::YAML #612

Open
Deekor opened this issue Jun 20, 2015 · 2 comments
Open

Heroku NameError: uninitialized constant MongoMapper::Railtie::YAML #612

Deekor opened this issue Jun 20, 2015 · 2 comments

Comments

@Deekor
Copy link

Deekor commented Jun 20, 2015

I am trying to push a Rails 4 app using MongoMapper to Heroku for the first time.

I am getting the error:

remote:        Running: rake assets:precompile
remote:        rake aborted!
remote:        NameError: uninitialized constant MongoMapper::Railtie::YAML

What am I doing wrong?

@kg1990
Copy link

kg1990 commented Jun 29, 2015

you can try

require 'yaml' 

in you Gemfile

@djroze
Copy link

djroze commented Jul 13, 2015

I encountered this issue as well when executing in production mode a Rails app that uses MongoMapper v.0.13.1. The problem did not arise when running in development mode. I added a require 'yaml' to my config/application.rb, as follows (this seemed to me like a more suitable place than Gemfile):

require "rails"
require "yaml"
# Pick the frameworks you want:

Would be curious to know if this is a bug in the library or if there's a change that needs to be made to some environment-specific initializer in the Rails app (e.g. something getting loaded/required in development mode that shouldn't be restricted to that mode only).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants