WebEntity / Installation-guide-for-GitLab-on-OS-X

Installation guide for GitLab on OS X
236 stars 67 forks source link

To install pg, might need to add environment variable #52

Closed scottcc closed 8 years ago

scottcc commented 9 years ago

Your milage may vary, but for me, attempting to run sudo bundle install --deployment --without development test mysql aws failed (see below). I had to run this command: sudo env ARCHFLAGS="-arch x86_64" gem install pg -v '0.15.1', then also this (which both succeeded): sudo env ARCHFLAGS="-arch x86_64" bundle install --deployment --without development test mysql aws

So, we might want to add that blurb in the README.md? Unless there's a better way to deal with it of course.

Don't run Bundler as root. Bundler can ask for sudo if it is needed, and installing your bundle as root will break this application for all non-root users on this machine.
Fetching gem metadata from https://rubygems.org/........
Fetching version metadata from https://rubygems.org/...
Fetching dependency metadata from https://rubygems.org/..
Using rake 10.4.2
Using RedCloth 4.2.9
Using ace-rails-ap 2.0.1
Using i18n 0.7.0
Using json 1.8.2
Using minitest 5.3.5
Using thread_safe 0.3.5
Using tzinfo 1.2.2
Using activesupport 4.1.9
Using builder 3.2.2
Using erubis 2.7.0
Using actionview 4.1.9
Using rack 1.5.2
Using rack-test 0.6.3
Using actionpack 4.1.9
Using mime-types 1.25.1
Using mail 2.6.3
Using actionmailer 4.1.9
Using activemodel 4.1.9
Using arel 5.0.1.20140414130214
Using activerecord 4.1.9
Using rails-observers 0.1.2
Using activeresource 4.0.0
Using acts-as-taggable-on 3.5.0
Using addressable 2.3.5
Using asana 0.0.6
Using asciidoctor 0.1.4
Using encryptor 1.3.0
Using attr_encrypted 1.3.4
Using attr_required 1.0.0
Using execjs 2.5.2
Using autoprefixer-rails 5.1.11
Using descendants_tracker 0.0.3
Using ice_nine 0.10.0
Using axiom-types 0.0.5
Using bcrypt 3.1.7
Using sass 3.2.19
Using bootstrap-sass 3.3.4.1
Using browser 0.7.2
Using cal-heatmap-rails 0.0.1
Using carrierwave 0.9.0
Using hitimes 1.2.2
Using timers 4.0.1
Using celluloid 0.16.0
Using charlock_holmes 0.7.2
Using coercible 1.0.0
Using coffee-script-source 1.6.3
Using coffee-script 2.2.0
Using thor 0.19.1
Using railties 4.1.9
Using coffee-rails 4.0.1
Using colored 1.2
Using connection_pool 2.1.0
Using creole 0.3.8
Using d3_rails 3.5.5
Using default_value_for 3.0.0
Using orm_adapter 0.5.0
Using warden 1.2.3
Using devise 3.2.4
Using devise-async 0.9.0
Using bundler 1.10.3
Using hike 1.2.3
Using multi_json 1.10.1
Using tilt 1.4.1
Using sprockets 2.11.0
Using sprockets-rails 2.2.4
Using rails 4.1.9
Using rotp 1.6.1
Using devise-two-factor 1.0.1
Using diff-lcs 1.2.5
Using diffy 3.0.3
Using doorkeeper 2.1.3
Using dotenv 0.9.0
Using dropzonejs-rails 0.4.14
Using enumerize 0.7.0
Using equalizer 0.0.8
Using escape_utils 0.2.4
Using eventmachine 1.0.4
Using excon 0.32.1
Using expression_parser 0.9.0
Using multipart-post 1.2.0
Using faraday 0.8.9
Using faraday_middleware 0.9.0
Using formatador 0.2.4
Using net-ssh 2.8.0
Using net-scp 1.1.2
Using fog-core 1.21.1
Using fog-json 1.0.0
Using fog-brightbox 0.0.1
Using mini_portile 0.6.2
Using nokogiri 1.6.6.2
Using fog 1.21.0
Using font-awesome-rails 4.2.0.0
Using foreman 0.63.0
Using rugged 0.22.2
Using gemnasium-gitlab-service 0.2.6
Using gemojione 2.0.0
Using posix-spawn 0.3.9
Using github-markup 1.3.1
Using gitlab-grit 2.7.2
Using gitlab-flowdock-git-hook 0.4.2.2
Using gitlab-grack 2.0.2
Using gitlab-linguist 3.0.1
Using gitlab_emoji 0.1.0
Using gitlab_git 7.1.13
Using gitlab_meta 7.0
Using net-ldap 0.11
Using hashie 2.1.2
Using omniauth 1.2.2
Using pyu-ruby-sasl 0.0.3.3
Using rubyntlm 0.5.0
Using gitlab_omniauth-ldap 1.2.1
Using gollum-grit_adapter 0.1.3
Using rouge 1.7.7
Using sanitize 2.1.0
Using stringex 2.5.2
Using gollum-lib 4.0.2
Using gon 5.0.1
Using multi_xml 0.5.5
Using rack-accept 0.4.5
Using rack-mount 0.8.3
Using virtus 1.0.1
Using grape 0.6.1
Using grape-entity 0.4.2
Using haml 4.0.5
Using haml-rails 0.5.3
Using httparty 0.13.3
Using mimemagic 0.3.0
Using hipchat 1.5.0
Using html-pipeline 1.11.0
Using http_parser.rb 0.5.3
Using httpauth 0.2.1
Using httpclient 2.5.3.3
Using ice_cube 0.11.1
Using jquery-atwho-rails 1.0.1
Using jquery-rails 3.1.0
Using jquery-scrollto-rails 1.4.3
Using turbolinks 2.0.0
Using jquery-turbolinks 2.0.1
Using jquery-ui-rails 4.2.1
Using jwt 0.1.13
Using kaminari 0.15.1
Using kgio 2.9.2
Using mousetrap-rails 1.4.6
Using newrelic_rpm 3.9.4.245
Using nprogress-rails 0.1.2.3
Using oauth 0.4.7
Using oauth2 0.8.1
Using sawyer 0.6.0
Using octokit 3.7.0
Using omniauth-oauth 1.0.1
Using omniauth-bitbucket 0.0.2
Using omniauth-oauth2 1.1.1
Using omniauth-github 1.1.1
Using omniauth-gitlab 1.0.0
Using omniauth-google-oauth2 0.2.5
Using omniauth-multipassword 0.4.1
Using timfel-krb5-auth 0.8.3
Using omniauth-kerberos 0.2.0
Using omniauth-shibboleth 1.1.1
Using omniauth-twitter 1.0.1
Using rubypants 0.2.0
Using org-ruby 0.9.12
with native extensions 
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.

    /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby extconf.rb
checking for pg_config... yes
Using config values from /usr/local/bin/pg_config
checking for libpq-fe.h... yes
checking for libpq/libpq-fs.h... yes
checking for pg_config_manual.h... yes
checking for PQconnectdb() in -lpq... no
checking for PQconnectdb() in -llibpq... no
checking for PQconnectdb() in -lms/libpq... no
Can't find the PostgreSQL client library (libpq)
*** 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
    --without-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=/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/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}/
    --with-pg-config
    --without-pg-config
    --with-pg_config
    --without-pg_config
    --with-pqlib
    --without-pqlib
    --with-libpqlib
    --without-libpqlib
    --with-ms/libpqlib
    --without-ms/libpqlib

Gem files will remain installed in /Users/git/gitlab/vendor/bundle/ruby/2.0.0/gems/pg-0.15.1 for inspection.
Results logged to /Users/git/gitlab/vendor/bundle/ruby/2.0.0/gems/pg-0.15.1/ext/gem_make.out
An error occurred while installing pg (0.15.1), and Bundler cannot continue.
Make sure that `gem install pg -v '0.15.1'` succeeds before bundling.
CiTroNaK commented 9 years ago

Please, could you make PR?

scottcc commented 9 years ago

I had started a branch with this work, but came across different errors which I think are very similar to #54 (or even exactly like it). So I didn't want to submit a partial fix which might make things worse.

CiTroNaK commented 8 years ago

I had no problem with PostgreSQL on OS X 10.10. Please open it if you find any other problems.