title: Use MySQL from AMPPS with Rails
body: <p>I'm trying to use Rails with the MySQL bin from Ampps, but when I run the command <code>rails generate scaffold User name:string email:string</code> I get the following error:</p>
  
  <pre><code>dyld: lazy symbol binding failed: Symbol not found: _mysql_server_init
  Referenced from: /Users/myusername/.rvm/gems/ruby-2.2.1/gems/mysql2-0.4.2/lib/mysql2/mysql2.bundle
    Expected in: flat namespace
  
  dyld: Symbol not found: _mysql_server_init
    Referenced from: /Users/myusername/.rvm/gems/ruby-2.2.1/gems/mysql2-0.4.2/lib/mysql2/mysql2.bundle
    Expected in: flat namespace
  </code></pre>
  
  <p>I have already configured Ampps Mysql with my environment but I can not managed to make it work with rails, I have the following configurations.</p>
  
  <pre><code>$ which mysql                                          
  /Applications/AMPPS/mysql/bin/mysql
  
  $ echo $PATH
  /Users/myusername/.rvm/gems/ruby-2.2.1/bin:/Users/myusername/.rvm/gems/ruby-2.2.1@global/bin:/Users/myusername/.rvm/rubies/ruby-2.2.1/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Users/myusername/.rvm/gems/ruby-2.2.1/bin:/Users/myusername/.rvm/gems/ruby-2.2.1@global/bin:/Users/myusername/.rvm/rubies/ruby-2.2.1/bin:/Applications/AMPPS/php-5.4/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Users/myusername/.rvm/bin:/Users/myusername/.rvm/bin:/Applications/AMPPS/mysql/bin
  
  $ ls -l /usr/local/lib/libmy*.dylib 
  lrwxr-xr-x  1 myusername  admin  53 Jan  1 19:30 /usr/local/lib/libmysqlclient.18.dylib -&gt; /Applications/AMPPS/mysql/lib/libmysqlclient.18.dylib
  </code></pre>
  
  <p>I have tried doing commands but with no success:</p>
  
  <pre><code>$ gem install mysql2 -- --with-mysql-lib=/Applications/AMPPS/mysql/lib --with-mysql-include=/Applications/AMPPS/mysql/include --with-mysql-config=/Applications/AMPPS/mysql/bin/mysql_config
  </code></pre>
  
  <p>And </p>
  
  <pre><code>bundle config build.mysql2 --with-mysql-lib=/Applications/AMPPS/mysql/lib --with-mysql-include=/Applications/AMPPS/mysql/include --with-mysql-config=/Applications/AMPPS/mysql/bin/mysql_config
  bundle install
  </code></pre>
  
  <p>Any ideas?</p>