Hello I feel really stupid asking this question because I''ve had plenty of success with Rails. I recently whipped out and reinstalled on my iBook, installed ruby from source, rubygems from source, sudo gem install rails --include- dependencies and installed MySQL from Server Logistics'' 4.0.21 one- click installer. made a new database (commons) with a couple simple tables (students, assets) rails commons, change database.yml, ./script/generate model student -- no problem However ./script/generate scaffold student results in Bad handshake so i test using mysql -u root -h localhost -p commons providing the same password (foobar in this case) and I was able to make a successful connection. ./script/generate scaffold student -t -f points to /usr/lib/ruby/gems/ 1.8/gems/activerecord-1.10.1/lib/active_record/vendor/mysql.rb:452:in `read'' as the top of the trace and, of course, hitting localhost:3000/students/ results in a Mysql::Error in Techones#index of Bad handshake. Can anyone please help? Caleb
Update, I changed my root password from foobar to nothing, then created a rails_development, rails_test, and rails_production database, and duplicated the (empty) students table in each, $ rails test $ cd test $ ./script/generate model students --output which indicates success-- $ ./script/generate scaffold students --output which indicates failure, as per last time-- Then, to double check, I tried connecting to the database specifying/ not specifying host or password, each with success $ mysql -u root --success-- $ mysql -u root -h localhost --success-- etc with -p for an empty prompt Has anyone else experienced this problem? Its kind of urgent that I am able to develop on my laptop soon... So even acknowledging a common confusion would be greatly appreciated. Caleb Begin forwarded message:> From: Caleb Buxton <adbust-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> > Date: April 23, 2005 5:19:46 PM PDT (CA) > To: rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > Subject: Bad handshake > > > Hello > > I feel really stupid asking this question because I''ve had plenty > of success with Rails. > > I recently whipped out and reinstalled on my iBook, installed ruby > from source, rubygems from source, sudo gem install rails --include- > dependencies and installed MySQL from Server Logistics'' 4.0.21 one- > click installer. > > made a new database (commons) with a couple simple tables > (students, assets) > > rails commons, change database.yml, ./script/generate model student > -- no problem > > However > > ./script/generate scaffold student results in Bad handshake so i > test using mysql -u root -h localhost -p commons providing the same > password (foobar in this case) and I was able to make a successful > connection. > > ./script/generate scaffold student -t -f points to /usr/lib/ruby/ > gems/1.8/gems/activerecord-1.10.1/lib/active_record/vendor/mysql.rb: > 452:in `read'' as the top of the trace > > and, of course, hitting localhost:3000/students/ results in a > Mysql::Error in Techones#index of Bad handshake. > > Can anyone please help? > > Caleb >_______________________________________________ Rails mailing list Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails
I haven''t experienced your problem but... do you have the socket defined in your database.yml file? Just a thought. Trevor On 23-Apr-05, at 5:54 PM, Caleb Buxton wrote:> Update, > > I changed my root password from foobar to nothing, then created a > rails_development, rails_test, and rails_production database, and > duplicated the (empty) students table in each, > > $ rails test > $ cd test > $ ./script/generate model students > --output which indicates success-- > $ ./script/generate scaffold students > --output which indicates failure, as per last time-- > > Then, to double check, I tried connecting to the database > specifying/not specifying host or password, each with success > $ mysql -u root > --success-- > $ mysql -u root -h localhost > --success-- > > etc with -p for an empty prompt > > Has anyone else experienced this problem? > Its kind of urgent that I am able to develop on my laptop soon... So > even acknowledging a common confusion would be greatly appreciated. > > Caleb > > Begin forwarded message: > > From: Caleb Buxton <adbust-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> > Date: April 23, 2005 5:19:46 PM PDT (CA) > To: rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > Subject: Bad handshake > > > Hello > > I feel really stupid asking this question because I''ve had plenty of > success with Rails. > > I recently whipped out and reinstalled on my iBook, installed ruby > from source, rubygems from source, sudo gem install rails > --include-dependencies and installed MySQL from Server Logistics'' > 4.0.21 one-click installer. > > made a new database (commons) with a couple simple tables (students, > assets) > > rails commons, change database.yml, ./script/generate model student -- > no problem > > However > > ./script/generate scaffold student results in Bad handshake so i test > using mysql -u root -h localhost -p commons providing the same > password (foobar in this case) and I was able to make a successful > connection. > > ./script/generate scaffold student -t -f points to > /usr/lib/ruby/gems/1.8/gems/activerecord-1.10.1/lib/active_record/ > vendor/mysql.rb:452:in `read'' as the top of the trace > > and, of course, hitting localhost:3000/students/ results in a > Mysql::Error in Techones#index of Bad handshake. > > Can anyone please help? > > Caleb > > > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails_______________________________________________ Rails mailing list Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails
Now I have socket: /tmp/mysql.sock specified for each of the environments i get the same error Caleb PS: thanks for your prompt reply On 23-Apr-05, at 6:10 PM, Trevor Squires wrote:> I haven''t experienced your problem but... > > do you have the socket defined in your database.yml file? > > Just a thought. > > Trevor > > On 23-Apr-05, at 5:54 PM, Caleb Buxton wrote: > > >> Update, >> >> I changed my root password from foobar to nothing, then created a >> rails_development, rails_test, and rails_production database, and >> duplicated the (empty) students table in each, >> >> $ rails test >> $ cd test >> $ ./script/generate model students >> --output which indicates success-- >> $ ./script/generate scaffold students >> --output which indicates failure, as per last time-- >> >> Then, to double check, I tried connecting to the database >> specifying/not specifying host or password, each with success >> $ mysql -u root >> --success-- >> $ mysql -u root -h localhost >> --success-- >> >> etc with -p for an empty prompt >> >> Has anyone else experienced this problem? >> Its kind of urgent that I am able to develop on my laptop soon... >> So even acknowledging a common confusion would be greatly >> appreciated. >> >> Caleb >> >> Begin forwarded message: >> >> From: Caleb Buxton <adbust-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> >> Date: April 23, 2005 5:19:46 PM PDT (CA) >> To: rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org >> Subject: Bad handshake >> >> >> Hello >> >> I feel really stupid asking this question because I''ve had plenty >> of success with Rails. >> >> I recently whipped out and reinstalled on my iBook, installed ruby >> from source, rubygems from source, sudo gem install rails -- >> include-dependencies and installed MySQL from Server Logistics'' >> 4.0.21 one-click installer. >> >> made a new database (commons) with a couple simple tables >> (students, assets) >> >> rails commons, change database.yml, ./script/generate model >> student -- no problem >> >> However >> >> ./script/generate scaffold student results in Bad handshake so i >> test using mysql -u root -h localhost -p commons providing the >> same password (foobar in this case) and I was able to make a >> successful connection. >> >> ./script/generate scaffold student -t -f points to /usr/lib/ruby/ >> gems/1.8/gems/activerecord-1.10.1/lib/active_record/vendor/ >> mysql.rb:452:in `read'' as the top of the trace >> >> and, of course, hitting localhost:3000/students/ results in a >> Mysql::Error in Techones#index of Bad handshake. >> >> Can anyone please help? >> >> Caleb >> >> >> _______________________________________________ >> Rails mailing list >> Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org >> http://lists.rubyonrails.org/mailman/listinfo/rails >> > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails >_______________________________________________ Rails mailing list Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails
I know this is a long shot but did you remember to install the mysql- ruby bindings? I just re-installed my powerbook and ran through the same error messages until I realized I forgot to reinstall the mysql- ruby bindings. -Ezra On Apr 23, 2005, at 6:26 PM, Caleb Buxton wrote:> Now I have > > socket: /tmp/mysql.sock > > specified for each of the environments > > i get the same error > > Caleb > > PS: thanks for your prompt reply > > On 23-Apr-05, at 6:10 PM, Trevor Squires wrote: > >> I haven''t experienced your problem but... >> >> do you have the socket defined in your database.yml file? >> >> Just a thought. >> >> Trevor >> >> On 23-Apr-05, at 5:54 PM, Caleb Buxton wrote: >> >> >>> Update, >>> >>> I changed my root password from foobar to nothing, then created a >>> rails_development, rails_test, and rails_production database, and >>> duplicated the (empty) students table in each, >>> >>> $ rails test >>> $ cd test >>> $ ./script/generate model students >>> --output which indicates success-- >>> $ ./script/generate scaffold students >>> --output which indicates failure, as per last time-- >>> >>> Then, to double check, I tried connecting to the database >>> specifying/not specifying host or password, each with success >>> $ mysql -u root >>> --success-- >>> $ mysql -u root -h localhost >>> --success-- >>> >>> etc with -p for an empty prompt >>> >>> Has anyone else experienced this problem? >>> Its kind of urgent that I am able to develop on my laptop soon... >>> So even acknowledging a common confusion would be greatly >>> appreciated. >>> >>> Caleb >>> >>> Begin forwarded message: >>> >>> From: Caleb Buxton <adbust-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> >>> Date: April 23, 2005 5:19:46 PM PDT (CA) >>> To: rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org >>> Subject: Bad handshake >>> >>> >>> Hello >>> >>> I feel really stupid asking this question because I''ve had plenty >>> of success with Rails. >>> >>> I recently whipped out and reinstalled on my iBook, installed >>> ruby from source, rubygems from source, sudo gem install rails -- >>> include-dependencies and installed MySQL from Server Logistics'' >>> 4.0.21 one-click installer. >>> >>> made a new database (commons) with a couple simple tables >>> (students, assets) >>> >>> rails commons, change database.yml, ./script/generate model >>> student -- no problem >>> >>> However >>> >>> ./script/generate scaffold student results in Bad handshake so i >>> test using mysql -u root -h localhost -p commons providing the >>> same password (foobar in this case) and I was able to make a >>> successful connection. >>> >>> ./script/generate scaffold student -t -f points to /usr/lib/ruby/ >>> gems/1.8/gems/activerecord-1.10.1/lib/active_record/vendor/ >>> mysql.rb:452:in `read'' as the top of the trace >>> >>> and, of course, hitting localhost:3000/students/ results in a >>> Mysql::Error in Techones#index of Bad handshake. >>> >>> Can anyone please help? >>> >>> Caleb >>> >>> >>> _______________________________________________ >>> Rails mailing list >>> Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org >>> http://lists.rubyonrails.org/mailman/listinfo/rails >>> >> _______________________________________________ >> Rails mailing list >> Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org >> http://lists.rubyonrails.org/mailman/listinfo/rails >> > > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails >_______________________________________________ Rails mailing list Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails