Library not loaded after postgresql gem installation

Standard

library not loaded: @@HOMEBREW_PREFIX@@/opt/openssl/lib/libssl.1.0.0.dylib (LoadError)

 Referenced from: /usr/local/lib/libpq.5.dylib

Solution:

export DYLD_LIBRARY_PATH=/Library/PostgreSQL/9.3/lib
Advertisements

Xcode 4.3.x and MacPorts

Standard

Problem:

Error: The installed version of Xcode (3.2.6) is too old to use on the installed OS version. Version 4.1 or later is recommended on Mac OS X 10.7.

Solution:

sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer/

mysqldump doesn’t work on OSX Lion

Standard

-bash: mysqldump: command not found

So how do you fix this? Well, just copy and paste the following into your terminal window and press enter:

echo export PATH="/usr/local/bin:/usr/local/sbin:/usr/local/mysql/bin:$PATH" >> ~/.profile

source ~/.profile

Installing rmagick (2.13.1) with native extensions – Problem!

Standard

Problem:

Installing rmagick (2.13.1) with native extensions
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.

/Users/yourUser/.rvm/rubies/ruby-1.9.2-p320/bin/ruby extconf.rb
checking for Ruby version >= 1.8.5… yes
checking for clang… yes
checking for Magick-config… yes
checking for ImageMagick version >= 6.4.9… yes
checking for HDRI disabled version of ImageMagick… yes
checking for stdint.h… *** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers.  Check the mkmf.log file for more
details.  You may need configuration options.

Solution(Mac OS X Lion):

brew remove imagemagick 
brew install imagemagick --disable-openmp --from-source
bundle install

Possible problems with rails + mysql on OS X Lion

Standard

If you are trying to run your app with Rails and you got some errors when execute the rake db:migrate It is possible that you must to install the GCC. In Lion installation there is no gcc default. You can check GCC here: https://github.com/kennethreitz/osx-gcc-installer

Other possible error is the lack of a  symbolic link:

( Library not loaded: libmysqlclient.18.dylib )

ln -s /usr/local/mysql/lib/libmysqlclient.18.dylib /usr/lib/libmysqlclient.18.dylib

With these changes you may run successful the mysql + rails in your app.

Remembering that is a good practice to reinstall your gem after these changes:

gem uninstall mysql2

bundle install

Problems with Ruby on Mac OS X – Lion

Standard

When I’ve updated to Mac OS X Lion, I’ve found some error running rails application. The problem was  with my ruby installation. I got some sqlite3 errors, then I need to updated my Xcode to 4.3 version and install the Command Line Tools(Xcode->Preferences->Downloads).

After this, some errors appear:

ERROR:  Error installing sqlite3: ERROR: Failed to build gem native extension. 

and

try_do': The complier failed to generate an executable file. (RuntimeError) You have to install development tools first. 

Solution:

Reinstall ruby

rvm reinstall 1.9.2

But you may to get this message:

The provided compiler '/usr/bin/gcc' is LLVM based, it is not yet fully supported by ruby and gems, please read `rvm requirements`.

So you can use:

rvm reinstall 1.9.2 --with-gcc=clang