{"id":57,"date":"2010-02-20T22:03:55","date_gmt":"2010-02-20T21:03:55","guid":{"rendered":"http:\/\/www.aymericlamboley.fr\/blog\/?p=57"},"modified":"2015-03-09T17:12:49","modified_gmt":"2015-03-09T16:12:49","slug":"setting-up-mamp-for-php-ruby-on-rails-with-mysql","status":"publish","type":"post","link":"http:\/\/www.aymericlamboley.fr\/blog\/setting-up-mamp-for-php-ruby-on-rails-with-mysql\/","title":{"rendered":"Setting-up MAMP for Php &#038; Ruby on Rails with MySQL"},"content":{"rendered":"<p>If you want to develop php on localhost with you Mac, you sould use <a href=\"http:\/\/www.mamp.info\/en\/index.html\" target=\"_blank\">MAMP<\/a>. But it doesn&#8217;t display error. To change that, just go in bin\/php\/php5.6.2\/conf\/php.ini and change display_errors = &#8220;Off&#8221; by &#8220;On&#8221;. Easy, but if we don&#8217;t know it could take time.<\/p>\n<p>Now if you want to use Ruby on Rails on MAMP with MySQL instead of SQLite you need to download and install MAMP&#8217;s <a href=\"http:\/\/www.mamp.info\/en\/downloads\/index.html\" target=\"_blank\">libraries<\/a>.<br \/>\nAfter that, you should install Mysql for Ruby using Gem, do the command line in your terminal :<\/p>\n<pre lang=\"bash\">sudo env ARCHFLAGS=\"-arch x86_64\" gem install mysql -- --with-mysql-config=\/Applications\/MAMP\/Library\/bin\/mysql_config<\/pre>\n<p><\/code>And finally, you will have &#8220;gem installed&#8221;. To create a new Rails&#8217;s project with MySQL :\u00a0 <em>rails -d mysql myProject<\/em>. Next open the file config\/database.yml and add the line : <em>socket: \/Applications\/MAMP\/tmp\/mysql\/mysql.sock<\/em> below host.<br \/>\nDon&#8217;t forget to put your password !<\/p>\n<p>Now you can start working \ud83d\ude09<\/p>\n","protected":false},"excerpt":{"rendered":"<p>If you want to develop php on localhost with you Mac, you sould use MAMP. But it doesn&#8217;t display error. To change that, just go in bin\/php\/php5.6.2\/conf\/php.ini and change display_errors = &#8220;Off&#8221; by &#8220;On&#8221;. Easy, but if we don&#8217;t know it could take time. Now if you want to use Ruby on Rails on MAMP &hellip; <a href=\"http:\/\/www.aymericlamboley.fr\/blog\/setting-up-mamp-for-php-ruby-on-rails-with-mysql\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Setting-up MAMP for Php &#038; Ruby on Rails with MySQL<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0},"categories":[5],"tags":[],"_links":{"self":[{"href":"http:\/\/www.aymericlamboley.fr\/blog\/wp-json\/wp\/v2\/posts\/57"}],"collection":[{"href":"http:\/\/www.aymericlamboley.fr\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.aymericlamboley.fr\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.aymericlamboley.fr\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.aymericlamboley.fr\/blog\/wp-json\/wp\/v2\/comments?post=57"}],"version-history":[{"count":5,"href":"http:\/\/www.aymericlamboley.fr\/blog\/wp-json\/wp\/v2\/posts\/57\/revisions"}],"predecessor-version":[{"id":1442,"href":"http:\/\/www.aymericlamboley.fr\/blog\/wp-json\/wp\/v2\/posts\/57\/revisions\/1442"}],"wp:attachment":[{"href":"http:\/\/www.aymericlamboley.fr\/blog\/wp-json\/wp\/v2\/media?parent=57"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.aymericlamboley.fr\/blog\/wp-json\/wp\/v2\/categories?post=57"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.aymericlamboley.fr\/blog\/wp-json\/wp\/v2\/tags?post=57"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}