Ruby on Rails Thursday, March 29, 2012

Hi Leonardo,

Per my reply to Walter, I just ran "rake db:migrate
RAILS_ENV=production". However, I now get a "500 Internal Server
Error".

Below is my config/database.yml file and these are the permissions to
the db/production.sqlite3 file.

-rw-r--r-- 1 root root 5120 Mar 29 20:45 production.sqlite3

Do I have to change the ownership for this file?

Thanks,

Kal

-----------------------------------------------------------------------------------------------------------------------------

# SQLite version 3.x
# gem install sqlite3
#
# Ensure the SQLite 3 gem is defined in your Gemfile
# gem 'sqlite3'
development:
adapter: sqlite3
database: db/development.sqlite3
pool: 5
timeout: 5000

# Warning: The database defined as "test" will be erased and
# re-generated from your development database when you run "rake".
# Do not set this db to the same as development or production.
test:
adapter: sqlite3
database: db/test.sqlite3
pool: 5
timeout: 5000

production:
adapter: sqlite3
database: db/production.sqlite3
pool: 5
timeout: 5000

--------------------------------------------------------------------------------------------------------------------------

On Mar 29, 5:36 pm, Leonardo Mateo <leonardoma...@gmail.com> wrote:
> On Wed, Mar 28, 2012 at 9:56 PM, Kal <calcr...@gmail.com> wrote:
> > Hi All,
>
> > Can someone please help?  I've been banging my head against for wall
> > for 2 months; all of which has been spent trying to set up ROR.  So I
> > actually haven't written 1 line of code :(  Any help would be greatly
> > appreciated :)
>
> > I'm following the 4th edition of "Agile Web Development with Rails".
> > So, I'm able to deploy the site via WEBrick.  However, when I go to my
> > URL (without using port 3000), I get the error message below.  What am
> > I missing?
> > ---------------------------------------------------------------------------------------------------------------
>
> > Ruby (Rack) application could not be started
> > These are the possible causes:
>
> > There may be a syntax error in the application's code. Please check
> > for such errors and fix them.  A required library may not installed.
> > Please install all libraries that this application requires.  The
> > application may not be properly configured. Please check whether all
> > configuration files are written correctly, fix any incorrect
> > configurations, and restart this application.  A service that the
> > application relies on (such as the database server or the Ferret
> > search engine server) may not have been started.  Please start that
> > service.
>
> > Further information about the error may have been written to the
> > application's log file. Please check it in order to analyse the
> > problem.
>
> > Error message:
> >    unable to open database file (SQLite3::CantOpenException)
> > Exception class:
> >    PhusionPassenger::UnknownError
> > Application root:
> >    /home/rubys/work/depot
> > Backtrace
>
> The problem is not with your web server but with your database file.
> Check the database configured in config/database.yml exists and is
> accessible by the user that runs Apache (I guess on CentOS that user
> is called apache).
>
> If not, you should run:
> rake db:create
>
> Hope this help.
>
> Cheers!
> --
> Leonardo Mateo.
> There's no place like ~

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

No comments:

Post a Comment