Hi all,
i’ve been trying to get typo running on my webhost (asmallorange), but
not
having much luck.
i can run standard rails apps that have their public directory linked
into
~/www, so i know thats working.
i’ve linked the public dir from ~/typo into ~/www, and installed the
database schema.
trying to view the app in a browser returns a 400 error. i’ve also tried
the
following:
running dispatch.fcgi:
Status: 500 Internal Server Error
Content-Type: text/html
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<body>
<h1>Application error (Apache)</h1>
<p>Change this error message for exceptions thrown outside of an
action
(like in Dispatcher setups or broken Ruby code) in public/500.html</p>
</body>
</html>
also tried running “rake migrate” in the typo directory:
rake aborted!
Mysql::Error: #HY000Can't find file: 'schema_info.MYI' (errno: 2):
SELECT
version FROM schema_info
(See full trace by running task with --trace)
and finally, some output from the typo logs
# Logfile created on Tue Aug 15 02:46:50 EDT 2006 by logger.rb/1.5.2.7
allow_concurrency=true
Defined connections:
{"ActiveRecord::Base"=>#<ActiveRecord::Base::ConnectionSpecification:0x2a96ec3768
@config={:password=>"passy", :database=>"mydatabase",
:host=>"localhost",
:username=>"myusername", :adapter=>"mysql"},
@adapter_method="mysql_connection">}
Active connections: {}
Active connection name: ActiveRecord::Base
You have a nil object when you didn't expect it!
The error occured while evaluating nil.downcase
/usr/local/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/request.rb:18:in
`method'
/usr/local/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/base.rb:933:in
`log_processing'
/usr/local/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/base.rb:407:in
`process_without_filters'
/usr/local/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/filters.rb:377:in
`process_without_session_management_support'/usr/local/lib/ruby/gems/1.8/gems/actionpack-
1.12.5/lib/action_controller/session_management.rb:117:in `process'
/usr/local/lib/ruby/gems/1.8/gems/rails-1.1.6/lib/dispatcher.rb:38:in
`dispatch'
/usr/local/lib/ruby/gems/1.8/gems/rails-1.1.6/lib/fcgi_handler.rb:150:in
`process_request'
/usr/local/lib/ruby/gems/1.8/gems/rails-1.1.6/lib/fcgi_handler.rb:54:in
`process!'
/usr/local/lib/ruby/gems/1.8/gems/fcgi-0.8.7/lib/fcgi.rb:606:in
`each_cgi'
/usr/local/lib/ruby/gems/1.8/gems/rails-1.1.6/lib/fcgi_handler.rb:53:in
`process!'
/usr/local/lib/ruby/gems/1.8/gems/rails-1.1.6/lib/fcgi_handler.rb:23:in
`process!'
public/dispatch.fcgi:24
allow_concurrency=true
Defined connections:
{"ActiveRecord::Base"=>#<ActiveRecord::Base::ConnectionSpecification:0x2a96f771a0
@config={:password=>"passy", :database=>"mydatabase",
:host=>"localhost",
:adapter=>"mysql", :username=>"myusername"},
@adapter_method="mysql_connection">}
Active connections: {}
Active connection name: ActiveRecord::Base
SQL (0.000000) Mysql::Error: #42S01Table 'schema_info' already
exists:
CREATE TABLE schema_info (version int(11))
SQL (0.000000) Mysql::Error: #42S01Table 'schema_info' already
exists:
CREATE TABLE schema_info (version int(11))
SQL (0.000000) Mysql::Error: #HY000Can't find file:
'schema_info.MYI'
(errno: 2): SELECT version FROM schema_info
it looks as though it isn’t initialising the database connection
properly,
but my database.yml looks ok:
login: &login
adapter: mysql
host: localhost
username: myusername
password: passy
development:
database: mydatabase
<<: *login
test:
database: mydatabase
<<: *login
production:
database: mydatabase
<<: *login
and i can connect to the mysql database with
mysql -u myusername -p mydatabase
i’m pretty much stumped - any thoughts?
thanks for reading.