Showing posts with label rubygems. Show all posts
Showing posts with label rubygems. Show all posts

Wednesday, 4 April 2012

Error installing pg gem in Linux

If installing the pg gem in Linux fails with this error:

checking for pg_config... no
No pg_config... trying anyway. If building fails, please try again with
 --with-pg-config=/path/to/pg_config
checking for libpq-fe.h... no
Can't find the 'libpq-fe.h header
*** 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.
...
 An error occured while installing pg (0.13.2), and Bundler cannot continue.


Installing libpq-dev should solve the problem.
 sudo apt-get install libpq-dev  

Friday, 23 March 2012

Installing Rails 3.2 into Linux Mint (and other Linux distributions)


1) Install RVM:
  bash -s stable < <(curl -s https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer)   


2) Install or update RubyGems:
 gem update --system  


3) Install Rails:
 gem install rails  


That's it! Any problems, let me know below.