Reputation: 513
I just moved my Rails app which uses the versionist gem to www.c9.io. When doing rails s on my local machine I have no problem browsing, however when I try to view it on c9 I get uninitialized constant V1
. I'm not sure where to start as to what to provide you with to help me.
Here is my routes.rb
Rails.application.routes.draw do
api_version(
:module => "V1",
:header => {
:name => "Accept",
:value => "application/vnd.ContractTracker; version=1"},
:default => true) do
resources :contracts, defaults: {format: :json}
end
end
Upvotes: 0
Views: 122
Reputation: 513
The issue ended up being because the path to the controller in question was app/controllers/V1/foo_controller.rb
. Once I changed it to app/controllers/v1/foo_controller.rb
everything worked fine. Notice the change was V1
to v1
(capital V). I think the fix is how it should have been setup to begin with, I'm not 100% sure why OSX was allowing it to function in this case.
Upvotes: 1