I am a newbie and just started to learn Ruby on Rails. I have installed both Ruby, Rails, and MySQL server on my Windows XP system. Whenever I run a Rails application, it always gives me an error stating " MissingSourceFile in SayController#index, no such file to load -- sqlite3" and "This error occurred while loading the following files: sqlite3". I don''t want to use sqlite3 database. What I want is to use MySQL database by default. How do I make it to connect MySQL database by default instead of looking for sqlite3? -- 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
On Jan 21, 2008 11:26 AM, Chilung Tan <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> > I am a newbie and just started to learn Ruby on Rails. I have installed > both Ruby, Rails, and MySQL server on my Windows XP system. Whenever I > run a Rails application, it always gives me an error stating " > MissingSourceFile in SayController#index, no such file to load -- > sqlite3" and "This error occurred while loading the following files: > sqlite3". I don''t want to use sqlite3 database. What I want is to use > MySQL database by default. How do I make it to connect MySQL database by > default instead of looking for sqlite3?The key is in the config/database.yml file. The default file should look something like this: # SQLite version 3.x # gem install sqlite3-ruby (not necessary on OS X Leopard) development: adapter: sqlite3 database: db/development.sqlite3 timeout: 5000 # Warning: The database defined as ''test'' will be erased and # re-generated from your development database when you run ''rake''. # Do not set this db to the same as development or production. test: adapter: sqlite3 database: db/test.sqlite3 timeout: 5000 production: adapter: sqlite3 database: db/production.sqlite3 timeout: 5000 This gives the database configuration for each of the three environments development, test and production. For MySql you want something like development: adapter: mysql encoding: utf8 database: temp_development username: root password: socket: /tmp/mysql.sock # Warning: The database defined as ''test'' will be erased and # re-generated from your development database when you run ''rake''. # Do not set this db to the same as development or production. test: adapter: mysql encoding: utf8 database: temp_test username: root password: socket: /tmp/mysql.sock production: adapter: mysql encoding: utf8 database: temp_production username: root password: socket: /tmp/mysql.sock This is for an OSX system, some of the details like socket: might be different on Windows. For a new Rails project you can override the default by using the -d mysql option on the rails command. The way I got the above database.yml file was by entering $rails -d mysql temp and then copying the text from temp/config/database.yml If you are using an IDE or other means to generate the Rails app on Windows rather than the command line, you''ll have to find someone with more Rails on Windows experience than I have to help. -- Rick DeNatale My blog on Ruby http://talklikeaduck.denhaven2.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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
On Jan 21, 2008 8:26 AM, Chilung Tan <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> sqlite3". I don''t want to use sqlite3 database. What I want is to use > MySQL database by default. How do I make it to connect MySQL database by > default instead of looking for sqlite3?Edit `#{RAILS_ROOT}/config/database.yml` appropriately HTH! -- Hassan Schroeder ------------------------ hassan.schroeder-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Rick Denatale wrote:> > For a new Rails project you can override the default by using the -d > mysql option on the rails command. The way I got the above > database.yml file was by entering > > $rails -d mysql temp > > and then copying the text from temp/config/database.ymlThanks Rick for your detailed guidance. I did follow the steps you indicated. I used command "rake db:migrate" to create a schema.rb file under db directory successfully without any error. Inside config/database.yml file I set QUOTE development: adapter: mysql encoding: utf8 database: music_library_development username: root password: xxxx host: localhost UNQUOTE I created an album.rb file under under models directory by using the command "ruby script/generate model Album". I created an admin_controller.rb file under controllers directory by using the command "ruby script/generate controller Admin". Inside the admin_controller.rb file, I only added a line of "scaffold :album" and saved the file. I started the server by "ruby script/server" command. But when I went the Firefox browser and entered http://localhost:3000/admin, it gave me "500 Internal Server Error". What did I miss in these steps for my Windows XP system? -- 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
The scaffold method has been deprecated in Rails 2.0. On Jan 22, 2008 8:11 AM, Chilung Tan <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> > Rick Denatale wrote: > > > > For a new Rails project you can override the default by using the -d > > mysql option on the rails command. The way I got the above > > database.yml file was by entering > > > > $rails -d mysql temp > > > > and then copying the text from temp/config/database.yml > > Thanks Rick for your detailed guidance. > > I did follow the steps you indicated. > > I used command "rake db:migrate" to create a schema.rb file under db > directory successfully without any error. > > Inside config/database.yml file I set > > QUOTE > development: > adapter: mysql > encoding: utf8 > database: music_library_development > username: root > password: xxxx > host: localhost > UNQUOTE > > I created an album.rb file under under models directory by using the > command "ruby script/generate model Album". > I created an admin_controller.rb file under controllers directory by > using the command "ruby script/generate controller Admin". Inside the > admin_controller.rb file, I only added a line of "scaffold :album" and > saved the file. > I started the server by "ruby script/server" command. > But when I went the Firefox browser and entered > http://localhost:3000/admin, it gave me "500 Internal Server Error". > What did I miss in these steps for my Windows XP system? > > -- > Posted via http://www.ruby-forum.com/. > > > >-- Ryan Bigg http://www.frozenplague.net Feel free to add me to MSN and/or GTalk as this email. --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
grz01-Li4Q92Sp6+I@public.gmane.org
2008-Jan-27 17:27 UTC
Re: How do I switch sqlite3 to mysql on RoR
On Jan 21, 8:33 pm, "Hassan Schroeder" <hassan.schroe...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> On Jan 21, 2008 8:26 AM, Chilung Tan <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote: > > > sqlite3". I don''t want to use sqlite3 database. What I want is to use > >MySQLdatabase bydefault. How do I make it to connectMySQLdatabase by > >defaultinstead of looking for sqlite3? > > Edit `#{RAILS_ROOT}/config/database.yml` appropriately > > HTH! > -- > Hassan Schroeder ------------------------ hassan.schroe...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.orgIsnt this actually a little error in Rails? I run Rails v 2.0.2. When I type rails --help it says that mysql is the default for --database but still the database.yml will be setup for sqlite when creating a new application. Doesnt seem right to me? / grz01 --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
It was changed for 2.0.2 You must specify that you want to use mysql: rails myApp -d mysql -- 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
SQLite was made the default in 2.0. They must have just missed the change in the documentation. Peace, Phillip On Jan 27, 2008, at 11:27 AM, grz01-Li4Q92Sp6+I@public.gmane.org wrote:> > > Isnt this actually a little error in Rails? > I run Rails v 2.0.2. > > When I type > > rails --help > > it says that mysql is the default for --database > but still the database.yml will be setup for sqlite when creating a > new application. > Doesnt seem right to me? > > / grz01 > > >--~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
grz01-Li4Q92Sp6+I@public.gmane.org
2008-Jan-27 18:19 UTC
Re: How do I switch sqlite3 to mysql on RoR
yes - and they forgot to update the helptext then? (rails --help) /grz01 On Jan 27, 7:08 pm, Jimmy Palmer <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> It was changed for 2.0.2 > > You must specify that you want to use mysql: > > rails myApp -d mysql > > -- > Posted viahttp://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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
On 1/27/08, Phillip Koebbe <phillipkoebbe-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > SQLite was made the default in 2.0. They must have just missed the > change in the documentation.The default actually changed in 2.0.2 http://weblog.rubyonrails.org/2007/12/17/rails-2-0-2-some-new-defaults-and-a-few-fixes -- Rick DeNatale My blog on Ruby http://talklikeaduck.denhaven2.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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
I had intended on typing 2.0.x. I guess I''m not perfect either. Peace, Phillip On Jan 27, 2008, at 6:31 PM, Rick DeNatale wrote:> > On 1/27/08, Phillip Koebbe <phillipkoebbe-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: >> >> SQLite was made the default in 2.0. They must have just missed the >> change in the documentation. > > The default actually changed in 2.0.2 > http://weblog.rubyonrails.org/2007/12/17/rails-2-0-2-some-new- > defaults-and-a-few-fixes > > -- > Rick DeNatale > > My blog on Ruby > http://talklikeaduck.denhaven2.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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Rick Denatale wrote:> > The key is in the config/database.yml file. > ........ > The default file should look something like this: > # SQLite version 3.x...> This gives the database configuration for each of the three > environments development, test and production. > > For MySql you want something like...> > This is for an OSX system, some of the details like socket: might be > different on Windows. > > For a new Rails project you can override the default by using the -d > mysql option on the rails command. The way I got the above > database.yml file was by entering > > $rails -d mysql temp >that was fine, i got the problem in a snap, and even if i''m a newbie i''m appreciating so much ruby, and most of all ruby-people like you! :-) i never find such a friendly and effective community! really! Chilung Tan wrote: ...> I did follow the steps you indicated. >so did i, and worked smoothly, on linux ubuntu! thank a lot!! <i>the nth</i> -- 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Rick Denatale wrote:> > This is for an OSX system, some of the details like socket: might be > different on Windows. > > For a new Rails project you can override the default by using the -d > mysql option on the rails command. The way I got the above > database.yml file was by entering > > $rails -d mysql temp >> -- > Rick DeNatale > > My blog on Ruby > http://talklikeaduck.denhaven2.com/Rick, Huge thanks for your post. There''s a lot of erroneous information which has been extremely misleading on this issue. For the benefit of others who are having FURTHER problems installing the MySQL gem on their "OSX" systems, we should clarify a few other fine points. OSX is not OSX is not OSX in the case of installing this component. Many other people are finding it seemingly impossible to install the MySQL gem "on OSX." What they''re doing is abiding by instructions for earlier versions of OSX, which do not apply to the pre-bundled RoR installation on Leopard. In other words, folks are reading to install this gem with: gem install mysql This won''t work in recent versions of OSX such as Mac OS X 10.6.2 (10C540) -- which happens to be my version. You find so many posts indicating this is the way to install (without caveat), that you can easily be trapped into thinking this is supposed to work -- while it doesn''t. Your post helped me resolve this. I first thought I had to have the gem installed before building a project; but finally after yet another failed install, I did try to execute your line: rails myApp -d mysql Hmmm. I got a project (somewhat surprisingly). I thought then that maybe the XCode environment didn''t bother to check dependencies (which probably still is the case)... and while I was ruminating on that, there were the instructions, staring me in the face! :-) Funny, right in the database.yml file it says, that on Mac OSX *LEOPARD*, the gem install instruction is: "sudo env ARCHFLAGS="-arch i386" gem install mysql -- --with-mysql-config=/usr/local/mysql/bin/mysql_config" Now, that''s one line between the quotes (best perhaps to copy it form your .yml file and paste it into your console)... and bingo... the impossible install went perfectly. Note that I DID find this instruction in another post, but that several permutations of the necessary instruction failed because the user-agent hacked the expression. My advice to others who are suffering the same difficulties then installing the mysql gem to LEOPARD is, just (run your "rails myApp -d mysql" command and...) read the comment in the top of the .yml file and copy it into your console. -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Rick Denatale wrote:> > This is for an OSX system, some of the details like socket: might be > different on Windows. > > For a new Rails project you can override the default by using the -d > mysql option on the rails command. The way I got the above > database.yml file was by entering > > $rails -d mysql temp >> -- > Rick DeNatale > > My blog on Ruby > http://talklikeaduck.denhaven2.com/Rick, Huge thanks for your post. There''s a lot of erroneous information which has been extremely misleading on this issue. For the benefit of others who are having FURTHER problems installing the MySQL gem on their "OSX" systems, we should clarify a few other fine points. OSX is not OSX is not OSX in the case of installing this component. Many other people are finding it seemingly impossible to install the MySQL gem "on OSX." What they''re doing is abiding by instructions for earlier versions of OSX, which do not apply to the pre-bundled RoR installation on Leopard. In other words, folks are reading to install this gem with: gem install mysql This won''t work in recent versions of OSX such as Mac OS X 10.6.2 (10C540) -- which happens to be my version. You find so many posts indicating this is the way to install (without caveat), that you can easily be trapped into thinking this is supposed to work -- while it doesn''t. Your post helped me resolve this. I first thought I had to have the gem installed before building a project; but finally after yet another failed install, I did try to execute your line: rails myApp -d mysql Hmmm. I got a project (somewhat surprisingly). I thought then that maybe the XCode environment didn''t bother to check dependencies (which probably still is the case)... and while I was ruminating on that, there were the instructions, staring me in the face! :-) Funny, right in the database.yml file it says, that on Mac OSX *LEOPARD*, the gem install instruction is: "sudo env ARCHFLAGS="-arch i386" gem install mysql -- --with-mysql-config=/usr/local/mysql/bin/mysql_config" Now, that''s one line between the quotes (best perhaps to copy it form your .yml file and paste it into your console)... and bingo... the impossible install went perfectly. Note that I DID find this instruction in another post, but that several permutations of the necessary instruction failed because the user-agent hacked the expression. My advice to others who are suffering the same difficulties then installing the mysql gem to LEOPARD is, just (run your "rails myApp -d mysql" command and...) read the comment in the top of the .yml file and copy it into your console. -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Rick Denatale wrote:> On 1/27/08, Phillip Koebbe <phillipkoebbe-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: >> >> SQLite was made the default in 2.0. They must have just missed the >> change in the documentation. > > The default actually changed in 2.0.2 > http://weblog.rubyonrails.org/2007/12/17/rails-2-0-2-some-new-defaults-and-a-few-fixes > > -- > Rick DeNatale > > My blog on Ruby > http://talklikeaduck.denhaven2.com/Rick, Huge thanks for your post. There''s a lot of erroneous information which has been extremely misleading on this issue. For the benefit of others who are having FURTHER problems INSTALLING the MySQL gem on their "OSX" systems, we should clarify that Leopard "OSX" systems are an exception. If a person runs your console instruction: rails myApp -d mysql And if they then examine the comments of the database.yml file, they''ll find that the console instruction they have to execute ON LEOPARD is: "sudo env ARCHFLAGS="-arch i386" gem install mysql -- --with-mysql-config=/usr/local/mysql/bin/mysql_config" MANY POSTS elsewhere are instructing instead, that to install the gem, the console instruction is: gem install mysql NOT SO FOR LEOPARD. -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Rick, Huge thanks for your post. There''s a lot of erroneous information which has been extremely misleading on this issue. For the benefit of others who are having FURTHER problems INSTALLING the MySQL gem on their "OSX" systems, we should clarify that Leopard "OSX" systems are an exception. If a person runs your console instruction: rails myApp -d mysql And if they then examine the comments of the database.yml file, they''ll find that the console instruction they have to execute ON LEOPARD is: "sudo env ARCHFLAGS="-arch i386" gem install mysql -- --with-mysql-config=/usr/local/mysql/bin/mysql_config" MANY POSTS elsewhere are instructing instead, that to install the gem, the console instruction is: gem install mysql NOT SO FOR LEOPARD. -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Rick, Huge thanks for your post. There''s a lot of erroneous information which has been extremely misleading on this issue. For the benefit of others who are having FURTHER problems INSTALLING the MySQL gem on their "OSX" systems, we should clarify that Leopard "OSX" systems are an exception. If a person runs your console instruction: rails myApp -d mysql And if they then examine the comments of the database.yml file, they''ll find that the console instruction they have to execute ON LEOPARD is: "sudo env ARCHFLAGS="-arch i386" gem install mysql -- --with-mysql-config=/usr/local/mysql/bin/mysql_config" MANY POSTS elsewhere are instructing instead, that to install the gem, the console instruction is: gem install mysql NOT SO FOR LEOPARD. -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
> Funny, right in the database.yml file it says, that on Mac OSX > *LEOPARD*, the gem install instruction is: > > "sudo env ARCHFLAGS="-arch i386" gem install mysql -- > --with-mysql-config=/usr/local/mysql/bin/mysql_config"Two things: OS X 10.6 is "Snow Leopard", OS X 10.5 is "Leopard" And on Snow Leopard your ARCHFLAGS will depend if you are running 32 or 64 bit version of MySQL. Regards, Rimantas -- http://rimantas.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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Rick, Huge thanks for your post. There''s a lot of erroneous information which has been extremely misleading on this issue. For the benefit of others who are having FURTHER problems INSTALLING the MySQL gem on their "OSX" systems, it should be made clear that Leopard "OSX" systems are an exception to the instruction to install the mysql gem with "gem install mysql". If a person runs your console instruction: rails myApp -d mysql They can examine the comments of the database.yml file, in which they''ll find that the console instruction they have to run to execute mysql gem installation ON LEOPARD is: "sudo env ARCHFLAGS="-arch i386" gem install mysql -- --with-mysql-config=/usr/local/mysql/bin/mysql_config" Note that forum wrapping can corrupt posts of this instruction; so, best to copy it right out of the comments in the top of the database.yml flle you''ll get by running rails myApp -d mysql. -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
installing bundler and adding mysql to gemfile totally works ! http://techleap.blogspot.com/2010/11/not-able-to-create-database-mysql-and.html -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.