ruby - Issue with the installation of gem 'pg' in Heroku - Rails -


I am trying to install Ruby on Rails on OSX, for which I used to It looked fine on the terminal, but after doing

  $ rails new myapp - database = postgresql CD myapp   

I did it

  welcomes the rail controller   

and generates an error:

mani 'spring (& gt; = 0) Ruby could not be found in the gems available on this machine. To install the missing gems, install bundle

and after following the instructions, install me

  Time was an error PG (0.17.1), and mortgage can not continue. Ensure that the gem is successful before bundling 'PG-V' 0.17.1 '.   

And then ...

  Error: Error installing page: Error: Mani failed to create native extension. ... 'libpq-fe.h header *** extconf.rb can not get failed *** Could not make makefile due to some reason, maybe lack of required libraries and / or headers for more information mkmf Check the log file. You may need configuration options.   

A similar question said that the problem was solved by updating XCode, but I do not think this is my problem. If it was not already clear, I do not have much experience with Terminal or Ruby, so I'm not sure how to contact this issue.

Edit:

New Error Message

  Gems :: Extension :: Build Error: Error: Failed to create gem native extension Check the extconf.rb for / Users / mahireusufzai / .rbenv / versions / 2.1.1 / bin / ruby ​​pg_config ... Yes Use the config value from / usr / local / bin / pg_config *** extconf.rb failed * ** Do not make makefile due to some reason, perhaps lacking necessary libraries and / or headers. For more information check the mkmf.log file. You may need configuration options.   

...

  / user / mahirusufzai / RBNV / Virus-2.1.1 / Lib / Ruby / 2/1/02 / MKMF. RB: 456: In 'try_do': The compiler failed to generate an executable file. (Runtime error) You must first establish development tools / users/mahireusufzai/.rbenv/versions/2.1.1/lib/ruby/2.1.0/mkmf.rbitter41:in 'try_link0' /Users/mahireusufzai/.rbenv/ Versions / 2.1.1 / lib / to ruby ​​/ 2.1.0 / mkmf.rb: 556: from extco.rb in `try_link ': 39:` & lt; Main & gt; ' Extconf failed, exit code 1 gem file / user / mahirusufzai /. Will be established for inspection in RBNV / versions -2.1.1 / Lib / Ruby / Games / 2.1.0 / Village / GP-1.17.1.    

You must first install postgresql development libraries. It is complaining that libpq-fe.h is missing.

Try resolving the answer given in the following post:

Comments

Popular posts from this blog

Pass DB Connection parameters to a Kettle a.k.a PDI table Input step dynamically from Excel -

multithreading - PhantomJS-Node in a for Loop -

c++ - MATLAB .m file to .mex file using Matlab Compiler -