Ticket #75 (defect)
Opened 3 years ago
Last modified 3 years ago
can't signup
Status: closed (worksforme)
| Reported by: | jeffschallenberg@gmail.com | Assigned to: | bsag |
|---|---|---|---|
| Priority: | normal | Milestone: | Version 1.03 |
| Component: | Coding | Version: | 1.03 |
| Severity: | normal | Keywords: | signup activerecord database |
| Cc: | jeffschallenberg@gmail.com |
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:
- 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
Change History
06/26/05 18:34:24: Modified by bsag
- status changed from new to assigned.
06/27/05 18:10:28: Modified by jeffschallenberg@gmail.com:
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.
07/03/05 13:20:40: Modified by sean at mountcastle.org
Jeff,
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 ***
activerecord (1.10.1)
Implements the ActiveRecord? pattern for ORM.
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.
07/03/05 15:41:34: Modified by sean at mountcastle.org
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
07/24/05 22:28:19: Modified by msabramo@yahoo.com
- cc set to jeffschallenberg@gmail.com.
- keywords set to signup activerecord database.
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/
08/10/05 09:48:34: Modified by bsag
- status changed from assigned to closed.
- resolution set to worksforme.
I'll close this now as it looks like it's a configuration problem rather than a bug.
Thanks to all who helped diagnose the problem.

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.