can't signup
I am trying to install Tracks 1.03, following jjleonard's excellent tutorial and video.
I got THAT close!
But when I tried to run the signup command:
localhost:3000/login/signup
- this is the error I got:
ActiveRecord::StatementInvalid in Login#signup
Invalid argument: SHOW FIELDS FROM users
W:/www/tracks-1.03/app/controllers/login_controller.rb:30:in `new'
W:/www/tracks-1.03/app/controllers/login_controller.rb:30:in `signup'
script/server:51
On the other hand, if I go directly to:
http://localhost:3000/login
- I get the Tracks Login screen. Of course, I can't login because I haven't signed up...
The file signup.rhtml is in the folder C:\UniServer3_2a\diskw\tracks-1.03\app\views\login
Do you have any suggestions for me to check?
- Jeff Schallenberg
I got THAT close!
But when I tried to run the signup command:
localhost:3000/login/signup
- this is the error I got:
ActiveRecord::StatementInvalid in Login#signup
Invalid argument: SHOW FIELDS FROM users
W:/www/tracks-1.03/app/controllers/login_controller.rb:30:in `new'
W:/www/tracks-1.03/app/controllers/login_controller.rb:30:in `signup'
script/server:51
On the other hand, if I go directly to:
http://localhost:3000/login
- I get the Tracks Login screen. Of course, I can't login because I haven't signed up...
The file signup.rhtml is in the folder C:\UniServer3_2a\diskw\tracks-1.03\app\views\login
Do you have any suggestions for me to check?
- Jeff Schallenberg
Leave a comment
on 2005-06-26 21:34 *
By Anonymous
Status changed from New to Accepted
Status changed from New to Accepted
Hmm. You might try checking that you have ActiveRecord installed properly (I have version 1.10.1 using 'gem list' at the command line), as it does seem prone to not updating properly with the rest of the Rails components.
Second, check that your users table is set up properly with whatever database you are using. It should have columns id, login, password, word and is_admin. Check the schema in db/tracks_1.0.3_mysql.sql for details.
If that still doesn't help, email me and I'll see if I can sort it out.
Second, check that your users table is set up properly with whatever database you are using. It should have columns id, login, password, word and is_admin. Check the schema in db/tracks_1.0.3_mysql.sql for details.
If that still doesn't help, email me and I'll see if I can sort it out.
bsag, thank you for accepting this ticket and trying to help me get Tracks installed.
Your two suggestions would be helpful if I knew what you mean by
"have ActiveRecord? installed properly (I have version 1.10.1 using 'gem list' at the command line)" How could I check that? Which command line?
or "your users table is set up properly with whatever database you are using. It should have columns id, login, password, word and is_admin. Check the schema in db/tracks_1.0.3_mysql.sql for details." Users table? I thought I was using MySQL as a database?
Your offer to help by email is great. You have my email address, but I don't have yours.
Your two suggestions would be helpful if I knew what you mean by
"have ActiveRecord? installed properly (I have version 1.10.1 using 'gem list' at the command line)" How could I check that? Which command line?
or "your users table is set up properly with whatever database you are using. It should have columns id, login, password, word and is_admin. Check the schema in db/tracks_1.0.3_mysql.sql for details." Users table? I thought I was using MySQL as a database?
Your offer to help by email is great. You have my email address, but I don't have yours.
Jeff,
To check which version of ActiveRecord (a component of Rails) you have installed type: "gem list" at your command prompt:
jeff$ gem list
[... omitted ...]
activerecord (1.10.1)
Implements the ActiveRecord pattern for ORM.
[... omitted ...]
BTW, I'm having the same issues with signing up in 1.03, so I tried modifying the content.sql by inserting a new user into the DB, unfortunately that didn't work quite right (not sure if I got the password hash with SHA1). Now I'm attempting to modify the login screen with a link to the sign-up page and fix the sign-up page so it creates and adds the new user to the DB.
To check which version of ActiveRecord (a component of Rails) you have installed type: "gem list" at your command prompt:
jeff$ gem list
- LOCAL GEMS ***
[... omitted ...]
activerecord (1.10.1)
Implements the ActiveRecord pattern for ORM.
[... omitted ...]
BTW, I'm having the same issues with signing up in 1.03, so I tried modifying the content.sql by inserting a new user into the DB, unfortunately that didn't work quite right (not sure if I got the password hash with SHA1). Now I'm attempting to modify the login screen with a link to the sign-up page and fix the sign-up page so it creates and adds the new user to the DB.
Jeff,
If you add the following to db/tracks_1.0.3_content.sql:
INSERT INTO users (id,login,password,word,is_admin) VALUES (1,'test','9d22d6dbebeefcef69903cc1111bd24e8f2f3cd3','',1);
and then do:
mysql tracks_dev < db/tracks_1.0.3_content.sql
You will be able to login to Tracks using "test" and a blank password.
NOTE: This assumes that you've already created the database and corresponding tables using:
$ mysql -u root -p
mysql> create database tracks_dev;
mysql> grant all on tracks_dev.* to 'jeff'@'localhost';
mysql> exit
$mysql tracks_dev < db/tracks_1.0.3_mysql.sql
And setup config/database.yml with:
development:
adapter: mysql
database: tracks_dev
host: localhost
username: jeff
password:
And, of course, installed the mysql adapter GEM using:
$ gem install mysql
Note, if you're running on Mac OS X Tiger, here are special instructions related to that last step:
http://wiki.rubyonrails.com/rails/show/HowtoInstallOnOSXTiger
Good luck,
Sean
If you add the following to db/tracks_1.0.3_content.sql:
INSERT INTO users (id,login,password,word,is_admin) VALUES (1,'test','9d22d6dbebeefcef69903cc1111bd24e8f2f3cd3','',1);
and then do:
mysql tracks_dev < db/tracks_1.0.3_content.sql
You will be able to login to Tracks using "test" and a blank password.
NOTE: This assumes that you've already created the database and corresponding tables using:
$ mysql -u root -p
mysql> create database tracks_dev;
mysql> grant all on tracks_dev.* to 'jeff'@'localhost';
mysql> exit
$mysql tracks_dev < db/tracks_1.0.3_mysql.sql
And setup config/database.yml with:
development:
adapter: mysql
database: tracks_dev
host: localhost
username: jeff
password:
And, of course, installed the mysql adapter GEM using:
$ gem install mysql
Note, if you're running on Mac OS X Tiger, here are special instructions related to that last step:
http://wiki.rubyonrails.com/rails/show/HowtoInstallOnOSXTiger
Good luck,
Sean
I had a similar problem with a fresh tracks-1.03 install on Mac OS X Tiger with ruby-1.8.2, rails-0.13.1, activerecord-1.11.1, and WEBrick, except that my error said:
No database selected: SHOW FIELDS FROM users
It turned out that the problem was that I did not have the "mysql" gem installed.
I remedied this by doing:
sudo gem install mysql -- --with-mysql-dir=/usr/local/mysql
More about my Ruby on Rails and Tracks on Mac OS X Tiger experience at
http://marc.abramowitz.info/archives/2005/07/24/got-ruby-on-rails-and-tracks-working/
No database selected: SHOW FIELDS FROM users
It turned out that the problem was that I did not have the "mysql" gem installed.
I remedied this by doing:
sudo gem install mysql -- --with-mysql-dir=/usr/local/mysql
More about my Ruby on Rails and Tracks on Mac OS X Tiger experience at
http://marc.abramowitz.info/archives/2005/07/24/got-ruby-on-rails-and-tracks-working/