Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installing capybara-webkit (1.0.0) ERROR #290

Closed
s10wen opened this issue Nov 3, 2013 · 15 comments
Closed

Installing capybara-webkit (1.0.0) ERROR #290

s10wen opened this issue Nov 3, 2013 · 15 comments

Comments

@s10wen
Copy link
Contributor

s10wen commented Nov 3, 2013

Getting the following when trying to install, any ideas please?

Installing capybara-webkit (1.0.0)
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.

    /Users/simonowen/.rvm/rubies/ruby-2.0.0-p247/bin/ruby extconf.rb
Command 'qmake -spec macx-g++' not available


Gem files will remain installed in /Users/simonowen/.rvm/gems/ruby-2.0.0-p247/gems/capybara-webkit-1.0.0 for inspection.
Results logged to /Users/simonowen/.rvm/gems/ruby-2.0.0-p247/gems/capybara-webkit-1.0.0/./gem_make.out

An error occurred while installing capybara-webkit (1.0.0), and Bundler cannot continue.
Make sure that `gem install capybara-webkit -v '1.0.0'` succeeds before bundling.
@andrew
Copy link
Member

andrew commented Nov 3, 2013

Looks like you're missing QT.

If you're on a mac, I think this command will sort it:

brew install qt

@s10wen
Copy link
Contributor Author

s10wen commented Nov 3, 2013

Ta, ran that, but got some errors, tried to run bundle install again but no luck:

7 errors generated.
make[2]: *** [.obj/release-shared/qdrawhelper_ssse3.o] Error 1
make[1]: *** [release] Error 2
make: *** [sub-gui-make_default-ordered] Error 2

READ THIS: https://github.com/mxcl/homebrew/wiki/troubleshooting

These open issues may also help:
    https://github.com/mxcl/homebrew/pull/23890
    https://github.com/mxcl/homebrew/pull/22283
    https://github.com/mxcl/homebrew/issues/23480

Will have a look over the links it suggests.

@andrew
Copy link
Member

andrew commented Nov 3, 2013

Ah, are you on Mavericks? I've not upgraded yet.

@s10wen
Copy link
Contributor Author

s10wen commented Nov 3, 2013

Yup, also tried checking Xcode settings and a restart.

@jasnow
Copy link
Contributor

jasnow commented Nov 3, 2013

Do you use "brew doctor"?

@s10wen
Copy link
Contributor Author

s10wen commented Nov 4, 2013

Running brew doctor I get:

Warning: You have a curlrc file
If you have trouble downloading packages with Homebrew, then maybe this
is the problem? If the following command doesn't work, then try removing
your curlrc:
  curl http://github.com

Warning: /usr/bin occurs before /usr/local/bin
This means that system-provided programs will be used instead of those
provided by Homebrew. The following tools exist at both paths:

    git
    git-cvsserver
    git-receive-pack
    git-shell
    git-upload-archive
    git-upload-pack

Consider setting your PATH so that /usr/local/bin
occurs before /usr/bin. Here is a one-liner:
    echo export PATH="/usr/local/bin:$PATH" >> ~/.bash_profile

Tried running curl http://github.com and echo export PATH="/usr/local/bin:$PATH" >> ~/.bash_profile, then ran brew doctor again, but get the same thing.

@jasnow
Copy link
Contributor

jasnow commented Nov 4, 2013

@s10wen
Copy link
Contributor Author

s10wen commented Nov 4, 2013

Thanks @jasnow yeah I saw that link and ran brew update and brew install qt4 and got:

==> Downloading http://download.qt-project.org/official_releases/qt/4.8/4.8.5/qt-everywhere-opensou
Already downloaded: /Library/Caches/Homebrew/qt-4.8.5.tar.gz
==> ./configure -prefix /usr/local/Cellar/qt/4.8.5 -system-zlib -confirm-license -opensource -nomak
==> make
                                   ^
7 errors generated.
make[2]: *** [.obj/release-shared/qdrawhelper_ssse3.o] Error 1
make[1]: *** [release] Error 2
make: *** [sub-gui-make_default-ordered] Error 2

READ THIS: https://github.com/mxcl/homebrew/wiki/troubleshooting

These open issues may also help:
    https://github.com/mxcl/homebrew/pull/23890
    https://github.com/mxcl/homebrew/pull/22283
    https://github.com/mxcl/homebrew/issues/23480

Then when running bundle install got:

Installing capybara-webkit (1.0.0)
Errno::EACCES: Permission denied - /Users/simonowen/.rvm/gems/ruby-2.0.0-p247/gems/capybara-webkit-1.0.0/.gitignore
An error occurred while installing capybara-webkit (1.0.0), and Bundler cannot continue.
Make sure that `gem install capybara-webkit -v '1.0.0'` succeeds before bundling.

so tried sudo gem install capybara-webkit -v '1.0.0' and got:

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

    /Users/simonowen/.rvm/rubies/ruby-2.0.0-p247/bin/ruby extconf.rb
Command 'qmake -spec macx-g++' not available


Gem files will remain installed in /Users/simonowen/.rvm/gems/ruby-2.0.0-p247/gems/capybara-webkit-1.0.0 for inspection.
Results logged to /Users/simonowen/.rvm/gems/ruby-2.0.0-p247/gems/capybara-webkit-1.0.0/./gem_make.out

after that tried gem install rails but still got the same error, so went to http://qt-project.org/downloads downloaded "Qt Online Installer for Mac (9 MB) (Info)" and ran and got:

screen shot 2013-11-04 at 23 04 35

Is this what would happen if sudo gem install capybara-webkit -v '1.0.0' was to run? 949.16 MiB seems a bit big? or is that just how big it is?

@jasnow
Copy link
Contributor

jasnow commented Nov 4, 2013

Did you log in again after doing this command:
echo export PATH="/usr/local/bin:$PATH" >> ~/.bash_profile
so .bash_profile is run?

@s10wen
Copy link
Contributor Author

s10wen commented Nov 5, 2013

@jasnow I'm getting somewhere... I've fixed all my brew doctor issues by removing my .curlrc file for now and amending my $PATH. I also followed this Homebrew/legacy-homebrew#23793 this allowed me to run sudo gem install capybara-webkit -v '1.0.0' and got:

Building native extensions.  This could take a while...
Successfully installed capybara-webkit-1.0.0
unable to convert "\xCF" from ASCII-8BIT to UTF-8 for bin/webkit_server, skipping
unable to convert "\xCF" from ASCII-8BIT to UTF-8 for src/webkit_server, skipping
unable to convert "\xAF" from ASCII-8BIT to UTF-8 for src/webkit_server.gch/c++, skipping
unable to convert "\xAF" from ASCII-8BIT to UTF-8 for src/webkit_server.gch/objective-c++, skipping
Installing ri documentation for capybara-webkit-1.0.0
1 gem installed

Yay Successfully installed capybara-webkit-1.0.0 😄

So I ran sudo bundle install again, this time getting:

Your bundle is complete!
Use `bundle show [gemname]` to see where a bundled gem is installed.
Post-install message from newrelic_rpm:
# New Relic Ruby Agent Release Notes #

## v3.6.8 ##

* X-Ray Sessions support

  X-Ray Sessions provide more targeted transaction trace samples and thread
  profiling for web transactions. For full details see our X-Ray sessions
  documentation at https://newrelic.com/docs/site/xray-sessions.

* CPU metrics re-enabled for JRuby >= 1.7.0

  To work around a JRuby bug, the Ruby agent stopped gathering CPU metrics on
  that platform.  With the bug fixed, the agent can gather those metrics again.
  Thanks Bram de Vries for the contribution!

* Missing Resque transaction traces (3.6.8.168)

  A bug in 3.6.8.164 prevented transaction traces in Resque jobs from being
  communicated back to New Relic. 3.6.8.168 fixes this.

* Retry on initial connect (3.6.8.168)

  Failure to contact New Relic on agent start-up would not properly retry. This
  has been fixed.

* Fix potential memory leak on failure to send to New Relic (3.6.8.168)

  3.6.8.164 introduced a potential memory leak when transmission of some kinds
  of data to New Relic servers failed. 3.6.8.168 fixes this.

See https://github.com/newrelic/rpm/blob/master/CHANGELOG for a full list of
changes.

So I've tried to do bundle exec rake db:create:all and bundle exec rake db:migrate and bundle exec rails s but getting https://gist.github.com/simonowendesign/7317734

@andrew
Copy link
Member

andrew commented Nov 5, 2013

That looks like a postgres error, is it running? Are you using postgres from homebrew or the app (http://postgresapp.com/)?

@s10wen
Copy link
Contributor Author

s10wen commented Nov 5, 2013

homebrew

@andrew
Copy link
Member

andrew commented Nov 5, 2013

You can get the setup instructions using:

brew info postgres

Should contain a command to start it

@s10wen
Copy link
Contributor Author

s10wen commented Nov 5, 2013

Whoopee!! Got it working, had to do

initdb /usr/local/var/postgres -E utf8

to create a new database as it was a new install, then:

pg_ctl -D /usr/local/var/postgres -l /usr/local/var/postgres/server.log

to start up the server, then bundle exec rake db:create:all and bundle exec rake db:migrate worked 👍

@s10wen s10wen closed this as completed Nov 5, 2013
@thehalvo
Copy link

thehalvo commented Mar 3, 2014

brew install qt

worked for me! Thanks @andrew.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants