problem installing under fedora core 4
Hello,
I am trying to install tracks-1.04 on Fedora Core 4 Linux.
Mysql is running, and I have created the database, and updated database.yml
The problem is: when I do 'rake migrate', I get the error:
rake aborted!
Mysql::Error: Lost connection to MySQL server during query: SELECT version FROM schema_info
On the other hand, if I try 'rake db_schema_import', no error is reported, but the database is still empty.
If I try to run the server anyway, and access 0.0.0.0:3000/signup only the favicon is served, and the document is empty
Do you have any suggestions about things to try or places to look in the code ?
Thanks a lot.
I am trying to install tracks-1.04 on Fedora Core 4 Linux.
Mysql is running, and I have created the database, and updated database.yml
The problem is: when I do 'rake migrate', I get the error:
rake aborted!
Mysql::Error: Lost connection to MySQL server during query: SELECT version FROM schema_info
On the other hand, if I try 'rake db_schema_import', no error is reported, but the database is still empty.
If I try to run the server anyway, and access 0.0.0.0:3000/signup only the favicon is served, and the document is empty
Do you have any suggestions about things to try or places to look in the code ?
Thanks a lot.
Leave a comment
on 2006-03-08 22:36 *
By Anonymous
Assigned to changed from bsag to Anonymous
Status changed from New to Accepted
Assigned to changed from bsag to Anonymous
Status changed from New to Accepted
Did you make sure that you had your database details under both the 'production:' and 'development:' sections? db_schema_import assumes that your database is under development, so it would fail if you'd only filled in the production section.
rake migrate seems to be a bit flakey on different platforms - are you upgrading from an existing Tracks database, or creating a new one? I took it from your first paragraph that you were creating a new one, which usually works OK.
Anyway, let me know how you get on.
rake migrate seems to be a bit flakey on different platforms - are you upgrading from an existing Tracks database, or creating a new one? I took it from your first paragraph that you were creating a new one, which usually works OK.
Anyway, let me know how you get on.
Thanks for your help.
It's a new install, and I did fill in both the development and production section.
When I run mysql command line under the user i created for tracks, I do 'show tables' and there i nothing.
I read somewhere that in version 1.03, there were two sql scripts in db/ to rceate and populate the database. Is it still somewhere in 1.04 ? I only see one.
Regards,
-Benoit
It's a new install, and I did fill in both the development and production section.
When I run mysql command line under the user i created for tracks, I do 'show tables' and there i nothing.
I read somewhere that in version 1.03, there were two sql scripts in db/ to rceate and populate the database. Is it still somewhere in 1.04 ? I only see one.
Regards,
-Benoit
I'm afraid that I don't distribute schemas separately anymore because schema.rb (which is used with db_schema_import) gets automatically updated with changes to the schema, and it's portable between database formats. Anyway, if rake db_schema_import isn't working, then I suspect you've got deeper problems which wouldn't necessarily be resolved by having the correct schema.
First, are you sure that MySQL is actually working properly? Can you create some tables in a test database using the MySQL user you specify in database.yml? That user needs full create and delete privileges, or it won't work.
Second, check that you don't have any tab characters in the database.yml file (do a 'show invisible characters' or similar in your editor). yaml is very fussy about that. Double check all your details: database name, username, pass etc. I know it sounds silly, but the number of times I've been frustrated by the database not working, only to find that I've made a typo or something in the name is embarrassing ;-)
Double check that you copied log.tmpl to log, and the at the logs are chmodded to 777, just to be on the safe side.
If that doesn't work, I'm not sure what to suggest. if you run rake with the --trace option, you'll get some more detailed errors, which might allow us to track it down.
First, are you sure that MySQL is actually working properly? Can you create some tables in a test database using the MySQL user you specify in database.yml? That user needs full create and delete privileges, or it won't work.
Second, check that you don't have any tab characters in the database.yml file (do a 'show invisible characters' or similar in your editor). yaml is very fussy about that. Double check all your details: database name, username, pass etc. I know it sounds silly, but the number of times I've been frustrated by the database not working, only to find that I've made a typo or something in the name is embarrassing ;-)
Double check that you copied log.tmpl to log, and the at the logs are chmodded to 777, just to be on the safe side.
If that doesn't work, I'm not sure what to suggest. if you run rake with the --trace option, you'll get some more detailed errors, which might allow us to track it down.
mysql works, I have created and dropped a table with the user and password and db created for tracks. I upgraded mysql to the latest 4.1.16 for fc4. There is no typo in the config/database.yml file. log/development.log holds the same eror message many times:
SQL (0.000000) Mysql::Error: Lost connection to MySQL server d
uring query: CREATE TABLE schema_info (version int(11))
and if I do
(in /var/www/tracks-1.04)
Mysql::Error: Lost connection to MySQL server during query: SELECT version FROM schema_info
/var/www/tracks-1.04/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract_adapter.rb:88:in `log'
/var/www/tracks-1.04/vendor/rails/activerecord/lib/active_record/connection_adapters/mysql_adapter.rb:180:in `execute'
/var/www/tracks-1.04/vendor/rails/activerecord/lib/active_record/connection_adapters/mysql_adapter.rb:322:in `select'
/var/www/tracks-1.04/vendor/rails/activerecord/lib/active_record/connection_adapters/mysql_adapter.rb:175:in `select_one'
/var/www/tracks-1.04/vendor/rails/activerecord/lib/active_record/migration.rb:202:in `current_version'
/var/www/tracks-1.04/vendor/rails/activerecord/lib/active_record/migration.rb:219:in `current_version'
/var/www/tracks-1.04/vendor/rails/activerecord/lib/active_record/migration.rb:283:in `irrelevant_migration?'
/var/www/tracks-1.04/vendor/rails/activerecord/lib/active_record/migration.rb:225:in `migrate'
/var/www/tracks-1.04/vendor/rails/activerecord/lib/active_record/migration.rb:223:in `migrate'
/var/www/tracks-1.04/vendor/rails/activerecord/lib/active_record/migration.rb:190:in `up'
/var/www/tracks-1.04/vendor/rails/activerecord/lib/active_record/migration.rb:181:in `migrate'
/var/www/tracks-1.04/vendor/rails/railties/lib/tasks/databases.rake:3
/usr/lib/site_ruby/1.8/rake.rb:232:in `execute'
/usr/lib/site_ruby/1.8/rake.rb:232:in `execute'
/usr/lib/site_ruby/1.8/rake.rb:202:in `invoke'
/usr/lib/ruby/1.8/thread.rb:135:in `synchronize'
/usr/lib/site_ruby/1.8/rake.rb:195:in `invoke'
/usr/lib/site_ruby/1.8/rake.rb:1719:in `run'
/usr/lib/site_ruby/1.8/rake.rb:1719:in `run'
/usr/bin/rake:8
SQL (0.000000) Mysql::Error: Lost connection to MySQL server d
uring query: CREATE TABLE schema_info (version int(11))
and if I do
- rake migrate --trace
(in /var/www/tracks-1.04)
- Invoke migrate (first_time)
- Invoke environment (first_time)
- Execute environment
- Execute migrate
Mysql::Error: Lost connection to MySQL server during query: SELECT version FROM schema_info
/var/www/tracks-1.04/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract_adapter.rb:88:in `log'
/var/www/tracks-1.04/vendor/rails/activerecord/lib/active_record/connection_adapters/mysql_adapter.rb:180:in `execute'
/var/www/tracks-1.04/vendor/rails/activerecord/lib/active_record/connection_adapters/mysql_adapter.rb:322:in `select'
/var/www/tracks-1.04/vendor/rails/activerecord/lib/active_record/connection_adapters/mysql_adapter.rb:175:in `select_one'
/var/www/tracks-1.04/vendor/rails/activerecord/lib/active_record/migration.rb:202:in `current_version'
/var/www/tracks-1.04/vendor/rails/activerecord/lib/active_record/migration.rb:219:in `current_version'
/var/www/tracks-1.04/vendor/rails/activerecord/lib/active_record/migration.rb:283:in `irrelevant_migration?'
/var/www/tracks-1.04/vendor/rails/activerecord/lib/active_record/migration.rb:225:in `migrate'
/var/www/tracks-1.04/vendor/rails/activerecord/lib/active_record/migration.rb:223:in `migrate'
/var/www/tracks-1.04/vendor/rails/activerecord/lib/active_record/migration.rb:190:in `up'
/var/www/tracks-1.04/vendor/rails/activerecord/lib/active_record/migration.rb:181:in `migrate'
/var/www/tracks-1.04/vendor/rails/railties/lib/tasks/databases.rake:3
/usr/lib/site_ruby/1.8/rake.rb:232:in `execute'
/usr/lib/site_ruby/1.8/rake.rb:232:in `execute'
/usr/lib/site_ruby/1.8/rake.rb:202:in `invoke'
/usr/lib/ruby/1.8/thread.rb:135:in `synchronize'
/usr/lib/site_ruby/1.8/rake.rb:195:in `invoke'
/usr/lib/site_ruby/1.8/rake.rb:1719:in `run'
/usr/lib/site_ruby/1.8/rake.rb:1719:in `run'
/usr/bin/rake:8
Some progress: I needed to install the mysql bindings, and under FC4, specify the lib and include by hand:
gem install mysql -- --with-mysql-lib --with-mysql-lib=/usr/lib/mysql/ --with-mysql-include=/usr/include/mysql
Now when I do 'rake migrate', I get:
Mysql::Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''contexts' SET 'user_id' h1. 1;
when I look at the tables, I see:
+---------------------+
| Tables_in_tracks104 |
+---------------------+
| contexts |
| projects |
| schema_info |
| todos |
| users |
+---------------------+
5 rows in set (0.00 sec)
Only 'schema_info' is not empty
select * from schema_info;
+---------+
| version |
+---------+
| 1 |
+---------+
1 row in set (0.00 sec)
When I go to 0.0.0.0:3000 I still get nothing, and the server prints: 127.0.0.1 - - [10/Mar/2006:21:28:40 CET] "GET /signup HTTP/1.1" 500 0
- -> /signup
If instead of 'rake migrate' I do 'rake db_schema_import', no table is created at all, with no error message, and nothing in the log
gem install mysql -- --with-mysql-lib --with-mysql-lib=/usr/lib/mysql/ --with-mysql-include=/usr/include/mysql
Now when I do 'rake migrate', I get:
Mysql::Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''contexts' SET 'user_id' h1. 1;
when I look at the tables, I see:
+---------------------+
| Tables_in_tracks104 |
+---------------------+
| contexts |
| projects |
| schema_info |
| todos |
| users |
+---------------------+
5 rows in set (0.00 sec)
Only 'schema_info' is not empty
select * from schema_info;
+---------+
| version |
+---------+
| 1 |
+---------+
1 row in set (0.00 sec)
When I go to 0.0.0.0:3000 I still get nothing, and the server prints: 127.0.0.1 - - [10/Mar/2006:21:28:40 CET] "GET /signup HTTP/1.1" 500 0
- -> /signup
If instead of 'rake migrate' I do 'rake db_schema_import', no table is created at all, with no error message, and nothing in the log
I removed the quotes in 2_add_user_db, and 'rake migrate' works.
execute "UPDATE contexts SET user_id = 1;"
execute "UPDATE projects SET user_id = 1;"
execute "UPDATE todos SET user_id = 1;"
I could signup and eveything looks fine now.
Thanks for your help and for a great looking app. Can't wait to try it...
execute "UPDATE contexts SET user_id = 1;"
execute "UPDATE projects SET user_id = 1;"
execute "UPDATE todos SET user_id = 1;"
I could signup and eveything looks fine now.
Thanks for your help and for a great looking app. Can't wait to try it...
Migrated to GitHub issue #224