Heroku App Crashed No Errors In Log - ruby-on-rails

Hi I am trying to deploy a small app on heroku
I managed to create the app, push the contents to the app, scaled it by one dyno but when I try to do heroku open, the app crashed and gave me error code 10
Here is the log file in paste bin
http://pastebin.com/Rh4iXn3Y
I found this error, uninitialized constant SimpleForm (NameError)
I uninstalled the simpleform gem but I figured it left behind some files that the gem didn't remove, I removed the file myself.
It should not throw me this error.
I am new to heroku, I know I need to dig through the doc to see how it works, but in the mean time can some one help me out?
thanks!
if you need more information please let me know.

From your log file:
2013-05-16T00:02:10.346211+00:00 app[web.1]: /app/config/initializers/simple_form.rb:2:in `<top (required)>': uninitialized constant SimpleForm (NameError)
Remove /app/config/initializers/simple_form.rb
Don't afraid of reading logs line by line. Near all answers are already there.

Related

uninitialized constant Users ruby on rails

I have an app that I am working on, and there appear to be two key problems: due to a problem undetectable by me, the webapp I am working on returns the error "uninitialized constant Users" and the error "uninitiallized constant SubmitController." The code for the webapp is here. I have tried renaming multiple, possibly violating variables, and attempted to rid the app of the errors. However, I have not been sucessful. The code where the errors most likely originate are from app/views/users/show.html.erb, app/views/users/show.html.erb, app/controllers/user/submit.html.erb, app.controllers/user/submit_controller.rb, app/models/Submit.rb, app/models/user.rb, app/controllers/users_controller.rb, config/routes.rb.
Thanks in advance.
You have error because you don't have SubmitsContoller. Also you need to move app/controller/users/submit.erb to views folder. And one more rename file Submit.rb to submit.rb.
And to make it works create submit_controller.rb in controller folder.

Rails Server and Console crashing because of unexpected break (LocalJumpError)

I'm getting this weird behaviour when running rails server or rails console.
The server/console crashes in various locations in the code throwing this exception:
script/rails:6:in `require': unexpected break (LocalJumpError)
from script/rails:6:in `<main>'
I must note that this behaviour happens to only one more person in my team, all other members of my team does not experience this behaviour and also production server is working just fine with no crashes like this.
Also, we found putting debugger somewhere in the code and just pressing continue solves this problem. But this is hardly a logic way to deal with this bug.
Does anyone experienced similar behaviour and knows how to solve this?
I have not enough information to provide a 100% sure solution, but here is my guess :
Try to use bundle exec rails <command> rather than script/rails <command>. Rails script doesn't have changed for some time, but it may just be you're not loading the correct gem dependencies.
It would be interesting to know if the other person of your team getting the problem is using script/rails too. If all other people having no problem use the rather idiomatic bundle exec rails, you have a good clue for a dependency version problem.

getting "invalid multibyte escape: /^\xFF\xFE/ (SyntaxError)" error on Heroku

I'm using the VPIM gem for rails to create vcards for users based on their profile information.
It all works fine on my local host, but when I deploy to Heroku, the app crashes.
I'm getting the error below in the heroku logs, which I assume is what is causing the app to crash...
/app/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.12/lib/active_support/dependencies.rb:251:in `require': /app/vendor/bundle/ruby/2.0.0/gems/vpim-0.695/lib/vpim/vcard.rb:678: invalid multibyte escape: /^\xFE\xFF/ (SyntaxError)
2013-10-27T15:52:14.211497+00:00 app[web.1]: invalid multibyte escape: /^\xFF\xFE/
Any idea on how to fix this issue?
Here's the gem I'm using and some possible solutions that I haven't been able to get working yet. It might be because of my level of understanding of ruby-on-rails.
Gem: github(dot)com/fraser/vpim-rails
Possible solutions:
https://github.com/sam-github/vpim/issues/5
https://github.com/GetJobber/vpim-rails/commit/0c92b5d7f9b2f6a59bdeea3127dbb668072371cc
Any help will be much appreciated.
-Ethan
There is a quick fix for it. Open the following file
"/app/vendor/bundle/ruby/2.0.0/gems/vpim-0.695/lib/vpim/vcard.rb"
in text editor, and add the following line at the beginning of file.
"# encoding: ISO-8859-1"
This solved it for me.

Rails Console Broken

I discovered today that my ruby console on rails is no longer working. (I don't work out of the console all that often, so not exactly sure when or how this happened). I'd like to get feedback on whether others have encountered this issue, and whether I should reinstall ruby, rails, or any other program or configuration.
When I enter
$ rails console
It gets me to what looks like the console, but anything I enter returns a NoMethodError, with undefined methods that are typos of what I actually entered.
For example, when I entered
irb(main):001:0> editor = Editor.new(name: "bob")
I get the response
NoMethodError: undefined method 'oews' for main:Object
from (irb):8
from c:/Ruby193/lib/ruby/gems/1.9.1/gems/railties-3.2.6/lib/rails/commands/console.rb:47:in 'start'
from c:/Ruby193/lib/ruby/gems/1.9.1/gems/railties-3.2.6/lib/rails/commands/console.rb:8:in 'start'
from c:/Ruby193/lib/ruby/gems/1.9.1/gems/railties-3.2.6/lib/rails/commands.rb:41:in <top (required)>'
from script/rails:6:in 'require'
from script/rails:6:in '<main>'
which seems to be a misinterpretation of the "new" method. Also, the railties-3.2.6 folder referenced above seems to be empty.
This happens in both my SQlite3 and PG environments.
Any insight on what may be causing this? I want to minimize the number of reinstallments if possible.
I'm currently running ruby 1.9.3 and rails 3.2.6
Thanks much!
Check that you are in the directory of the application. If you're on Mac or linux use the cd command.
The cause of the problem is still not clear.
A restart seems to have fixed it. Sorry, should have done so before posting the question.

NameError: uninitialized constant Object::User

I searched the other posts that had this issue and could not find one that fixed my particular issue. My irb is going crazy. I am trying to change user roles in my database but I can't even get to my users!
irb(main):001:0> User.all
NameError: uninitialized constant Object::User
from (irb):1
from c:/Ruby192/bin/irb:12:in `<main>'
It was working fine, stopped working, was fine, and now stopped again. I have a User model and users added. I cannot pinpoint the issue. Let me know what code you need to see. Thanks!
You should run
ruby script/console # Rails < 3
or
rails c # Rails 3.x
But not (I believe you've just run this)
irb
Make sure you're actually using the rails console command rather than just running irb in your project folder.

Resources