0

I just started learning Ruby on Rails with my mac and I'm stuck. I'm using PostgreSQL as my database, and of course, the gem 'pg'.

When I bundle install or I try to create a controller it gives me lots of syntax errors. However, if I delete that gem from my gemfile, I get no syntax errors.

I used to have that gem as gem 'pg' with fancy quotes and it gave me an error related only to that line. Something like

can't find gem pg

I've been searching questions related here, but none of them showed me an answer, even though I tried everything I saw. I also asked a guy who works with RoR and he told me to change the quotes' shape (from fancy to normal), which lead to the error I have shown you.

Holger Just
  • 52,918
  • 14
  • 115
  • 123
  • 3
    Please edit your question and include details of your question: Add the `Gemfile` you are using, add the exact error message you are getting on install (and the command you are using to install). Please also add the versions of Ruby and Rails you are using. Without this information, we unfortunately can't answer your question. There is also a guide on [how to ask good questions on Stack Overflow](http://stackoverflow.com/help/how-to-ask). – Holger Just Mar 19 '15 at 10:32
  • What \`\`fancy quotes\`\` are you talking about? – D-side Mar 19 '15 at 11:07

1 Answers1

0

First you should install native extension for pg gem: Consider this topic Installing PG gem on OS X - failure to build native extension Then you should be able to install this gem with gem install pg

Community
  • 1
  • 1
Viktor Vsk
  • 327
  • 3
  • 10