I'm using railshoster.de and they don't help me deploying my app.
It is this one: https://github.com/ClaudiuCreanga/your-priorities
It works in localhost.
Railshohster.de is using capistrano and passanger.
I get this error when trying to run it: We're sorry, but something went wrong.
In development.log there is no error.
What did I do:
1) Cloned my app
2) bundle install - worked well
3) rake db:schema:load and rake db:seed also worked well.
My questions are:
Where else can I look for errors?
Should it be any difference in deploying localhost vs online?
Thanks!
Finally the issue was with the table migration not being done properly and failing at some point.
Related
I'm cloning a RoR app from Github. After the clone I install my gems. Now at this point my question/problem arises. Some research I've done suggests I do a
rake db:create
followed by a
rake db:migrate
I've tried both of those steps but am still having trouble.
When I run
rails console
and do something like Plan.first it returns nil. And when I try to visit my application I get an ActiveRecord::RecordNotFound in PagesController#home error alluding to the fact that it can't find the plan id of 1.
Any help is much appreciated.
Thanks in advance!
You have an empty database with no data in it, if seeds are provided - rake db:seed will help, otherwise you'll have to create initial data youself (in rails console, or may be directly in db)
I'm a newbie developing a rails app. I pushed the master to Heroku and ran "git heroku run rake db:migrate" without problems.
The app runs great locally, but on Heroku a "duration" field in one of my tables erroneously reports an error indicating that it "can not be blank" even though I pass it a valid value per the model's validation. This behavior only occurs on Heroku. Locally, the "presence" validation behaves as expected. Heroku does not indicate any problen with my database schema, but it appears something may be wrong in the database. That's my hunch, but I don't know.
To troubleshoot: I reset the Heroku database by running "heroku pg:reset DATABASE" and then ran "heruko run rake db:migrate". Those commands did not solve the problem.
I don't know how to troubleshoot further. Any thoughts, suggestions or ideas? I'm running SQLite3 in my development & testing environments with pg on Heroku. I haven't made any unusual SQLite migrations. I do plan to get rid of SQLite3 and go with pg entirely, but I need to solve this problem first. Thanks in advance for any help!
I am following Michael Hartl's Rails Tutorials screen cast series and having trouble in deploying demo Rails application in Heroku. The deploy is successful but when I try to open the URl, it gives an Application Error
The link for the app is http://evening-lake-3818.herokuapp.com/ . Please Help !!
Looks like you've not used rake db:migrate
Heroku
This error is a heroku error (not a rails problem) - the typical Rails errors are the red error page, which says something like "Something went wrong" or "Page Cannot Be Found":
The error you are seeing is a Heroku problem, and is typically because you've either not set up your production database, or you have not got the required migrations to make it work.
The way to fix this is to run:
# heroku run rake db:migrate
Other than that, you'll also need to ensure you have the config/database.yml set up correctly for your production environment (which I can help you with if you need it)
I'm using Ubuntu, with Rails 3.0.1 with mysql2 socket.
When i do runing install, rake db:create and after rails server, my Welcome aboard, shows ActiveRecord::ConnectionNotEstablished in About your application’s environment
What i do?
Had the same problem on rails 3.1.1:
rake db:create - ok
rails console and some DMLs - ok
but accessing info from the web-page resulted in ActiveRecord::ConnectionNotEstablished.
A rails server restart helped.
It sounds like your MySQL server isn't running. You'll need to install MySQL if you haven't already (apt-get install mysql-server should do it). Once it's running, you'll need to set up a user and database for your app, and note the username and password so that you can put that information in config/database.yml within your app.
This link will be useful if you need any help with those steps.
You'll need to do some more debugging to work it out.
How are you running your server?
Make yourself a model.
rails generate model Something name:string
Then try running rake db:migrate
Does this work?
If it does, then you must be running your server in a different way (maybe you're running it in production mode?)
Try rails console and try to do Something.count
If all of those work
then I'd suggest you try restarting your server.
rails server
since several days I have this problem:
For a few days it has worked and now I can't do it works again. I setup a rails server on ubuntu with apache-2. I used a git repository to get all new change. After I run
sudo rake db:migrate RAILS_ENV=production
But after have restart apache server I can see that rails use the development db and not the production while before it has used it.
I don't really understand what can cause this. So i really appreciate some help.
Thanks in advance.
Try:
env RAILS_ENV=production rake db:migrate
You can also add the following line to your $HOME/.bash_profile:
export RAILS_ENV=production
I found my problem. In apache sites configuration I had RailsEnv development instead of production.
But now I have another problem: rails does not start due to
* Exception ArgumentError in
PhusionPassenger::Railz::ApplicationSpawner (No association found for
name machines'. Has it been defined yet?) (process 16052):
from
/usr/lib/ruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/nested_attributes.rb:245:in
accepts_nested_attributes_for'
from
/usr/lib/ruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/nested_attributes.rb:222:in
each'
from
/usr/lib/ruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/nested_attributes.rb:222:in
accepts_nested_attributes_for'
from /home/et1/wip3/sophia/app/models/machines_operatingsystem.rb:2
But I don't understand why.