I''m trying to use Ruby and Rails and getting very disheartened after a day of failure with a variety of errors. I''ve tried various approaches from the suggestions on this and other forums, so far all without success. These include three separate ways of doing the installation. In all cases, I''ve simply done the steps in the getting started guide: rails firstgo -d mysql cd firstgo rake db:create (1) Using the built-in ruby that came with the Mac Xcode package (I believe) in /usr/bin ==============================================================This results in the message: Couldn''t create database for {"reconnect"=>false, "encoding"=>"utf8", "username"=>"root", "adapter"=>"mysql", "database"=>"firstgo_development", "pool"=>5, "password"=>"mypassword", "socket"=>"/tmp/mysql.sock"}, charset: utf8, collation: utf8_unicode_ci (if you set the charset manually, make sure you have a matching collation) None of the following facts mentioned in forums have helped: * I do have 64 bit MySQL loaded. * It is the correct password. * I have tried the password both with and without quotes * It is the correct socket. * I have tried this both with the Mysql driver as it was originally loaded, and with the command: sudo env ARCHFLAGS="-arch x86_64" gem install mysql -- --with-mysql- config=/usr/local/mysql/bin/mysql_config (which is pointing at the correct mysql config.) 2. Compiling Ruby from source into /usr/local/bin ====================================I follow the instructions in http://hivelogic.com/articles/compiling-ruby-rubygems-and-rails-on-snow-leopard to compile Ruby 1.8.7 from source. I''ve tried it both with Rubygems 1.8.5 (the current one) and 1.8.3 (as described in the original post). Here, the process doesn''t get that far, giving the following messages: rake aborted! no such file to load -- iconv /Users/david/rubicon/firstgo/Rakefile:10 (See full trace by running task with --trace) 3. Compiling Ruby from macports into /opt/local/bin =====================================I started with sudo port install ruby19, and then followed the various instructions to update rubygems, bring in the MySQL driver, etc. In this case, the system told me that the built-in mysql driver had been removed, and that I should run sudo gem install mysql. I did this, and verified that gem could see mysql in the list. But this didn''t make any difference to the error message. AAAAAAARGH! About the only thing I haven''t done is to uninstall and reinstall MySQL. I''m really reluctant to do this, since it''s a perfectly good 64- bit version, and I daren''t risk the other things on my system that use it - this is the main system I use for development of a load of other stuff. A full and long day''s work later with no results, I''m pretty distressed. Does anyone have any ideas? -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Hi, you can try using VirtualRails : http://www.virtualrails.org it''s a free virtual linux-based Ruby on Rails development environment, all fully configured. It runs under virtualbox, and takes 5 mins to install. nonetheless you OSX won''t suffer from the "rails-conf process" :) On 23 juil, 11:25, xgretsch <davidkar...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> I''m trying to use Ruby and Rails and getting very disheartened after a > day of failure with a variety of errors. I''ve tried various approaches > from the suggestions on this and other forums, so far all without > success. These include three separate ways of doing the installation. > > In all cases, I''ve simply done the steps in the getting started guide: > rails firstgo -d mysql > cd firstgo > rake db:create > > (1) Using the built-in ruby that came with the Mac Xcode package (I > believe) in /usr/bin > ==============================================================> This results in the message: > > Couldn''t create database for {"reconnect"=>false, "encoding"=>"utf8", > "username"=>"root", "adapter"=>"mysql", > "database"=>"firstgo_development", "pool"=>5, > "password"=>"mypassword", "socket"=>"/tmp/mysql.sock"}, charset: utf8, > collation: utf8_unicode_ci (if you set the charset manually, make sure > you have a matching collation) > > None of the following facts mentioned in forums have helped: > > * I do have 64 bit MySQL loaded. > > * It is the correct password. > > * I have tried the password both with and without quotes > > * It is the correct socket. > > * I have tried this both with the Mysql driver as it was originally > loaded, and with the command: > sudo env ARCHFLAGS="-arch x86_64" gem install mysql -- --with-mysql- > config=/usr/local/mysql/bin/mysql_config > (which is pointing at the correct mysql config.) > > 2. Compiling Ruby from source into /usr/local/bin > ====================================> I follow the instructions inhttp://hivelogic.com/articles/compiling-ruby-rubygems-and-rails-on-sn... > to compile Ruby 1.8.7 from source. I''ve tried it both with Rubygems > 1.8.5 (the current one) and 1.8.3 (as described in the original post). > Here, the process doesn''t get that far, giving the following messages: > > rake aborted! > no such file to load -- iconv > /Users/david/rubicon/firstgo/Rakefile:10 > (See full trace by running task with --trace) > > 3. Compiling Ruby from macports into /opt/local/bin > =====================================> I started with sudo port install ruby19, and then followed the various > instructions to update rubygems, bring in the MySQL driver, etc. > > In this case, the system told me that the built-in mysql driver had > been removed, and that I should run sudo gem install mysql. > > I did this, and verified that gem could see mysql in the list. But > this didn''t make any difference to the error message. > > AAAAAAARGH! > > About the only thing I haven''t done is to uninstall and reinstall > MySQL. I''m really reluctant to do this, since it''s a perfectly good 64- > bit version, and I daren''t risk the other things on my system that use > it - this is the main system I use for development of a load of other > stuff. > > A full and long day''s work later with no results, I''m pretty > distressed. > > Does anyone have any ideas?-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Jerome Fillioux wrote:> Hi, > > you can try using VirtualRails : http://www.virtualrails. org >But you shouldn''t have to. Apple''s Ruby plus a working MySQL installation should be fine; search the list archives for ideas on why your setup isn''t working. Better yet, switch to PostgreSQL, which is a much better database. Best, -- Marnen Laibow-Koser http://www.marnen.org marnen-sbuyVjPbboAdnm+yROfE0A@public.gmane.org Sent from my iPhone -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On Jul 23, 4:25 am, xgretsch <davidkar...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> I''m trying to use Ruby and Rails and getting very disheartened after a > day of failure with a variety of errors. I''ve tried various approaches > from the suggestions on this and other forums, so far all without > success. These include three separate ways of doing the installation.Sounds like you''ve done everything right, but let me throw out a stupid question: any chance your mysql server isn''t actually running? When I logoff/reboot, I always forget to restart the mysql service and I get weird client errors. Jeff purpleworkshops.com -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Also if mysql is running, log on to mysql in the terminal using the user and password in your conf and make sure you can get in -- mysql -u [user_name] -p On Fri, Jul 23, 2010 at 10:36 AM, Jeff <cohen.jeff-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> On Jul 23, 4:25 am, xgretsch <davidkar...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > I''m trying to use Ruby and Rails and getting very disheartened after a > > day of failure with a variety of errors. I''ve tried various approaches > > from the suggestions on this and other forums, so far all without > > success. These include three separate ways of doing the installation. > > Sounds like you''ve done everything right, but let me throw out a > stupid question: any chance your mysql server isn''t actually running? > When I logoff/reboot, I always forget to restart the mysql service and > I get weird client errors. > > Jeff > purpleworkshops.com > > -- > You received this message because you are subscribed to the Google Groups > "Ruby on Rails: Talk" group. > To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to > rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org<rubyonrails-talk%2Bunsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> > . > For more options, visit this group at > http://groups.google.com/group/rubyonrails-talk?hl=en. > >-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Thanks (and the stupid questions are worth asking!) but mysql is definitely OK and running (by the way, it launches at startup - Jeff, I can point out how if you''re interested). I kind of wonder whether there''s an incompatibility in the mysql password mechanism between "old passwords" and "new passwords" - the difference being in the "identified by ''mypassword''|" and the "identified by password(''mypassword'')" constructs. But I can''t actually tell what the ruby mysql driver is trying to do... I''ve given up on the mysql driver for now and am testing using sqlite3. Eventually, I may have to revisit this one. But it''s not pretty... On Jul 23, 3:42 pm, David Kahn <d...-rfEMNHKVqOwNic7Bib+Ti1W1rNmOCjRP@public.gmane.org> wrote:> Also if mysql is running, log on to mysql in the terminal using the user and > password in your conf and make sure you can get in -- > > mysql -u [user_name] -p > > > > On Fri, Jul 23, 2010 at 10:36 AM, Jeff <cohen.j...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > On Jul 23, 4:25 am, xgretsch <davidkar...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > I''m trying to use Ruby and Rails and getting very disheartened after a > > > day of failure with a variety of errors. I''ve tried various approaches > > > from the suggestions on this and other forums, so far all without > > > success. These include three separate ways of doing the installation. > > > Sounds like you''ve done everything right, but let me throw out a > > stupid question: any chance your mysql server isn''t actually running? > > When I logoff/reboot, I always forget to restart the mysql service and > > I get weird client errors. > > > Jeff > > purpleworkshops.com > > > -- > > You received this message because you are subscribed to the Google Groups > > "Ruby on Rails: Talk" group. > > To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > > To unsubscribe from this group, send email to > > rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org<rubyonrails-talk%2Bunsubscrib e@googlegroups.com> > > . > > For more options, visit this group at > >http://groups.google.com/group/rubyonrails-talk?hl=en.-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.