I have a Rails Project with some Engines we are using to modularise the work. One of the engines has the foundation-rails gem as a dependency
this is the call for the gem in the engine's gemspec:
s.add_dependency 'foundation-rails'
The Gemfile for the Engine looks like this:
source "https://rubygems.org"
gemspec
And my main ruby app Gemfile calls the engine like this
gem 'my_engine_name', path: 'engines/my_engine_name'
Things work as expected when running the server locally. I have a couple of views that are correctly loading all foundation's assets and styles.
However, the deployed app on heroku throws this error
Rails 4.1.6 application starting in production on http://0.0.0.0:55282
2014-10-16T13:06:46.175620+00:00 app[web.1]: => Run `rails server -h` for more startup
options
2014-10-16T13:06:46.175622+00:00 app[web.1]: => Notice: server is listening on all interfaces (0.0.0.0). Consider using 127.0.0.1 (--binding option)
2014-10-16T13:06:46.175624+00:00 app[web.1]: => Ctrl-C to shutdown server
2014-10-16T13:06:46.175626+00:00 app[web.1]: Exiting
2014-10-16T13:06:46.146888+00:00 app[web.1]: /app/vendor/bundle/ruby/2.1.0/gems/foundation-rails-5.0.3.1/app/controllers/foundation/rails/styleguide_controller.rb:3:in `<module:Rails>': uninitialized constant Foundation::Rails::ApplicationController (NameError)
2014-10-16T13:06:46.146909+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.1.0/gems/foundation-rails-5.0.3.1/app/controllers/foundation/rails/styleguide_controller.rb:2:in `<module:Foundation>'
2014-10-16T13:06:46.146911+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.1.0/gems/foundation-rails-5.0.3.1/app/controllers/foundation/rails/styleguide_controller.rb:1:in `<top (required)>'
2014-10-16T13:06:46.146913+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.1.0/gems/railties-4.1.6/lib/rails/engine.rb:468:in `block (2 levels) in eager_load!'
2014-10-16T13:06:46.146915+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.1.0/gems/railties-4.1.6/lib/rails/engine.rb:467:in `each'
2014-10-16T13:06:46.146920+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.1.0/gems/railties-4.1.6/lib/rails/engine.rb:467:in `block in eager_load!'
So my question would be, does anyone ever had a similar issue? I couldn't find anyone with my same error, I saw people with problems building the app on heroku when deploying or not getting their assets loaded, but my app builds just fine when deployed this error occurs when I try to load the page on the web browser.