Reputation: 50
I am attempting to deploy my app using heroku with Ruby on Rails. It's a simple task app using devise for my user registrations. I believe the problem is the devise registrations controller as my logs seem to tell me.
> 2016-05-25T17:45:50.379667+00:00 app[web.1]: => Booting WEBrick
> 2016-05-25T17:45:50.379741+00:00 app[web.1]: ^
> 2016-05-25T17:45:50.379749+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.5/lib/active_support/dependencies.rb:274:in `block in require' 2016-05-25T17:45:50.379740+00:00 app[web.1]: class MyDevise:RegistrationsController < Dev...
> 2016-05-25T17:45:50.379724+00:00 app[web.1]: Exiting
> 2016-05-25T17:45:50.379717+00:00 app[web.1]: => Rails 4.2.5 application starting in production on http://0.0.0.0:22282
> 2016-05-25T17:45:50.379738+00:00 app[web.1]: /app/vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.5/lib/active_support/dependencies.rb:274:in `require': /app/app/controllers/users/registrations_controller.rb:1:
> syntax error, unexpected tSYMBEG, expecting '<' or ';' or '\n'
> (SyntaxError) 2016-05-25T17:45:50.379722+00:00 app[web.1]: => Run
> `rails server -h` for more startup options
Any help would be greatly appreciated! I will post any other files needed, I did not modify the registrations controller so as of now I don't have access to that. Thank you!
class MyDevise:RegistrationsController < Devise::RegistrationsController
def new
render :new
end
def edit
render :edit
end
end
Upvotes: 0
Views: 280
Reputation: 7167
There is nothing wrong with Devise, you are simply getting a syntax error in /app/app/controllers/users/registrations_controller.rb:1
Could you show us the first lines of that file?
It should look something like this:
class MyDevise::RegistrationsController < Devise::RegistrationsController
# ...
Also, you are deploying WEBrick to Heroku, I recommend you follow their guidelines and deploy with Puma instead. This is not the problem you are experiencing, but following the guidelines of the platform will help you out in the long run.
EDIT: You and me where both missing a semicolon after MyDevise
. I added it so we don't spread the error and to make it easier for other readers.
Upvotes: 4
Reputation: 10349
Your class definition is missing a semicolon.
class MyDevise:RegistrationsController < Devise::RegistrationsController
should be class MyDevise::RegistrationsController < Devise::RegistrationsController
Upvotes: 2