rubymonsters / text-to-squares

Railsgirls Berlin Learning Group Project
13 stars 14 forks source link

can't start rails... #95

Closed zaziemo closed 12 years ago

zaziemo commented 12 years ago

... I get this error message if I try "bundle install" and I don't understand what to do. The things I find on the internet refer to windows and I have a mac :(

Thanks for help anyone ;)

Building native extensions. This could take a while... ERROR: Error installing pg: ERROR: Failed to build gem native extension.

    /Users/maren/.rvm/rubies/ruby-1.9.3-p194/bin/ruby extconf.rb

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.

Provided configuration options: --with-opt-dir --with-opt-include --without-opt-include=${opt-dir}/include --with-opt-lib --without-opt-lib=${opt-dir}/lib --with-make-prog --without-make-prog --srcdir=. --curdir --ruby=/Users/maren/.rvm/rubies/ruby-1.9.3-p194/bin/ruby --with-pg --without-pg --with-pg-dir --without-pg-dir --with-pg-include --without-pg-include=${pg-dir}/include --with-pg-lib --without-pg-lib=${pg-dir}/lib --with-pg-config --without-pg-config --with-pg_config --without-pg_config

Gem files will remain installed in /Users/maren/.rvm/gems/ruby-1.9.3-p194/gems/pg-0.14.1 for inspection. Results logged to /Users/maren/.rvm/gems/ruby-1.9.3-p194/gems/pg-0.14.1/ext/gem_make.out

tyranja commented 12 years ago

hm, I would say its a databank problem. something with pg = postgres. again.

did you try that: rails s --with-pg-config=/path/to/pg_config

maybe?

fidothe commented 12 years ago

The problem is that bundle install is trying to install the pg -- postgres adapter -- gem, and the pg gem can't find postgres on your machine.

If it's installed you can try running gem install pg directly, but passing in the path to the pg_config program that postgres comes with. you could try running which pg_config and see if your shell can find it -- it probably can -- and then take that path and run gem install pg like this:

gem install pg -- --with-pg-config=/usr/local/bin/pg_config

replacing /usr/local/bin/pg_config with whatever which pg_config reported.

The other possibility is that you haven't installed Postgres yet, in which case you can do that and retry bundle install.

If you need to install postgres, then you should look at Homebrew - http://mxcl.github.com/homebrew/

It's a pretty straightforward process to get Homebrew installed, and then installing postgres is as simple as typing

brew install postgres

Matt

On 1 Nov 2012, at 12:19, zaziemo wrote:

... I get this error message if I try "bundle install" and I don't understand what to do. The things I find on the internet refer to windows and I have a mac :(

Thanks for help anyone ;)

Building native extensions. This could take a while... ERROR: Error installing pg: ERROR: Failed to build gem native extension.

/Users/maren/.rvm/rubies/ruby-1.9.3-p194/bin/ruby extconf.rb

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.

Provided configuration options: --with-opt-dir --with-opt-include --without-opt-include=${opt-dir}/include --with-opt-lib --without-opt-lib=${opt-dir}/lib --with-make-prog --without-make-prog --srcdir=. --curdir --ruby=/Users/maren/.rvm/rubies/ruby-1.9.3-p194/bin/ruby --with-pg --without-pg --with-pg-dir --without-pg-dir --with-pg-include --without-pg-include=${pg-dir}/include --with-pg-lib --without-pg-lib=${pg-dir}/lib --with-pg-config --without-pg-config --with-pg_config --without-pg_config

Gem files will remain installed in /Users/maren/.rvm/gems/ruby-1.9.3-p194/gems/pg-0.14.1 for inspection. Results logged to /Users/maren/.rvm/gems/ruby-1.9.3-p194/gems/pg-0.14.1/ext/gem_make.out

— Reply to this email directly or view it on GitHub.

Matt Patterson matt@constituentparts.com | +44 20 7193 4195 | +49 30 3471 2856

http://constituentparts.com/

Constituent Parts Limited | Company number 6366606, registered in England & Wales

zaziemo commented 12 years ago

thank you. I thought that I had already installed postgres and it worked last time. But I try again anyway. Now I get the warning that I haven't installed xCode yet. Do I need this?

Bumbledebee commented 12 years ago

Hi Maren, follow this install tutorial, it has all (from xcode, to pogres to homebrew etc.) explained easily for exactly your system:

http://docs.railsbridge.org/installfest/

Debbie

On 1 November 2012 17:52, zaziemo notifications@github.com wrote:

thank you. I thought that I had already installed postgres and it worked last time. But I try again anyway. Now I get the warning that I haven't installed xCode yet. Do I need this?

— Reply to this email directly or view it on GitHubhttps://github.com/svenfuchs/text-to-squares/issues/95#issuecomment-9987161.

zaziemo commented 12 years ago

thanks Debbie. I'll do that now but according to my download capacity it takes hours to download xcode :(

Bumbledebee commented 12 years ago

@mortice from soundcloud had a shorter way how to do that. he told the ones opposite from our table

ping him on twitter and I am sure he is happy to tell you what you can do instead

On 1 November 2012 18:09, zaziemo notifications@github.com wrote:

thanks Debbie. I'll do that now but according to my download capacity it takes hours to download xcode :(

— Reply to this email directly or view it on GitHubhttps://github.com/svenfuchs/text-to-squares/issues/95#issuecomment-9987737.

fidothe commented 12 years ago

If you install Xcode itself it's fairly small, and you should just be able to install just the bit you need for this from the weird preferences bit in the app - you just need the UNIX CLI stuff in order to be able to compile postgres...

On 1 Nov 2012, at 18:09, zaziemo wrote:

thanks Debbie. I'll do that now but according to my download capacity it takes hours to download xcode :(

— Reply to this email directly or view it on GitHub.

Matt Patterson matt@constituentparts.com | +44 20 7193 4195 | +49 30 3471 2856

http://constituentparts.com/

Constituent Parts Limited | Company number 6366606, registered in England & Wales

rentalcustard commented 12 years ago

Hey - in case you have problems with XCode or want a smaller download, the alternative Debbie mentioned was https://github.com/kennethreitz/osx-gcc-installer. I haven't used it myself, but I'm told that it works well...

On 1 November 2012 19:36, Matt Patterson notifications@github.com wrote:

If you install Xcode itself it's fairly small, and you should just be able to install just the bit you need for this from the weird preferences bit in the app - you just need the UNIX CLI stuff in order to be able to compile postgres...

On 1 Nov 2012, at 18:09, zaziemo wrote:

thanks Debbie. I'll do that now but according to my download capacity it takes hours to download xcode :(

— Reply to this email directly or view it on GitHub.

Matt Patterson matt@constituentparts.com | +44 20 7193 4195 | +49 30 3471 2856

http://constituentparts.com/

Constituent Parts Limited | Company number 6366606, registered in England & Wales

— Reply to this email directly or view it on GitHubhttps://github.com/svenfuchs/text-to-squares/issues/95#issuecomment-9990724.

zaziemo commented 12 years ago

ouff - it finally works. I downloaded xcode during nighttime ;)

zaziemo commented 12 years ago

many thanks to all helpers!

zaziemo commented 12 years ago

hmpf. now I get this error message. It seems that it's trying to connect to the wrong - whatever that means :(

PG::Error could not connect to server: No such file or directory Is the server running locally and accepting connections on Unix domain socket "/tmp/.s.PGSQL.5432"? Anyone with an idea?

fidothe commented 12 years ago

How did you install Postgres? Homebrew?

if so, run brew info postgres and check you followed the instructions to initialize the DB and start it…

On 2 Nov 2012, at 09:53, zaziemo notifications@github.com wrote:

hmpf. now I get this error message. It seems that it's trying to connect to the wrong - whatever that means :(

PG::Error could not connect to server: No such file or directory Is the server running locally and accepting connections on Unix domain socket "/tmp/.s.PGSQL.5432"? Anyone with an idea?

— Reply to this email directly or view it on GitHub.

rentalcustard commented 12 years ago

@zaziemo I'm going to put together a Getting Started section in the README, so I'm following through the setup of this app. When I run it, I don't need postgres, because the database config uses sqlite3 in development. What command are you running to try and start the application?

zaziemo commented 12 years ago

@mortice thank you so much. Now I'm a little bit confused because apparently I have different versions of my database.yml and gemfile than in our master branch (we worked on the issue different databases for development and production some weeks ago). Perhaps everything is a version/merging problem :(

rentalcustard commented 12 years ago

@zaziemo ok, I see your database.yml now. There's nothing wrong with it, but your postgres isn't running properly, I think... Did you see @fidothe's message above? You could try following his advice...

zaziemo commented 12 years ago

@mortice yes, I saw followed @fidothe instructions but then hat problems with my sqlite gem. finally I updated my origin again to svenfuchs/master and now everything works fine. Now I try to create a new feature ;) thanks for your patience, guys!

rentalcustard commented 12 years ago

Hah, ok! Enjoy :)