I've been following instructions to install capybara-webkit on Mac OS X 10.8. I've downloaded and installed:
qt-mac-opensource-4.8.5
qt-mac-opensource-4.8.5-debug-libs
Xcode Command Line tools + I later installed full XCode 5.0
qt4 using brew
Not necessary in this order
Running gem install capybara-webkit throws an error
# lots of output omitted
/Users/lenart/.rbenv/versions/2.0.0-p0/lib/ruby/2.0.0/fileutils.rb:1620:in `stat': No such file or directory - src/webkit_server (Errno::ENOENT)
from /Users/lenart/.rbenv/versions/2.0.0-p0/lib/ruby/2.0.0/fileutils.rb:1620:in `block in fu_each_src_dest'
from /Users/lenart/.rbenv/versions/2.0.0-p0/lib/ruby/2.0.0/fileutils.rb:1633:in `fu_each_src_dest0'
from /Users/lenart/.rbenv/versions/2.0.0-p0/lib/ruby/2.0.0/fileutils.rb:1618:in `fu_each_src_dest'
from /Users/lenart/.rbenv/versions/2.0.0-p0/lib/ruby/2.0.0/fileutils.rb:466:in `cp'
from /Users/lenart/.rbenv/versions/2.0.0-p0/lib/ruby/gems/2.0.0/gems/capybara-webkit-1.0.0/lib/capybara_webkit_builder.rb:76:in `build'
from /Users/lenart/.rbenv/versions/2.0.0-p0/lib/ruby/gems/2.0.0/gems/capybara-webkit-1.0.0/lib/capybara_webkit_builder.rb:88:in `build_all'
from extconf.rb:2:in `<main>'
Gem files will remain installed in /Users/lenart/.rbenv/versions/2.0.0-p0/lib/ruby/gems/2.0.0/gems/capybara-webkit-1.0.0 for inspection.
Results logged to /Users/lenart/.rbenv/versions/2.0.0-p0/lib/ruby/gems/2.0.0/gems/capybara-webkit-1.0.0/./gem_make.out
I've tried reinstalling qt, installing XQuartz-2.7.4, ... without luck. There is no trace of similar problems on Github :(
Here's some additional info should it help someone figure out the cause - http://pastie.org/8355714.
Feeling silly answering my own question but looks like I needed to actually run XCode and accept their terms and conditions. After doing that running gem install capybara-webkit worked.
Related
Using Xcode v11.3 I try to export my .IPA file and get this error.
An error occurred during export. The data couldn’t be read because of it
isn’t in the correct format
This is shown in IDEDistribution.standard.log
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require': cannot load such file -- cfpropertylist (LoadError)
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from /Applications/Xcode.app/Contents/Developer/usr/bin/ipatool:15:in `<main>'
2020-02-05 07:57:11 +0000 /Applications/Xcode.app/Contents/Developer/usr/bin/ipatool exited with 1
2020-02-05 07:57:11 +0000 ipatool JSON: (null)
I have tried rvm use system but in vain. Thanking in anticipation.
TL;DR
Running:
$ gem install CFPropertyList
$ gem install sqlite3
and then restarting solved it for me.
Full story:
I've just had the same problem. Googling around I found this article which talks about a different problem, but pointed me to the right direction: there is an issue with Ruby.
I then bumped into this issue which focused on the cannot load such file -- cfpropertylist part of the error message.
Running gem install CFPropertyList effectively allowed me to move forward one more step. This time a similar error complained about sqlite3. Running gem install sqlite3, again, should solve the problem.
Please note that you need SQLite installed systemwide (brew install sqlite), and that you NEED to restart your system, for whatever reason.
to fix it on M1 Mac
Go to Xcode foldar > right click open Get Info > make sure open using Rosetta has been checked
don't forget quit Xcode then open it
I made a mistake earlier today where I ran a git clean -f command and it seems to have wiped out rails and rvm. I tried to re-install both, and the installations seemed to work, but when I try to run the rails -v I get a gem load error. This tells me that the installation did not work properly, even though I watched railties get installed a few minutes ago. Does anyone have any advice for this sitation? Or do you have experience troubleshooting an error like this?
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/dependency.rb:296:into_specs': Could not find 'railties' (>= 0) among 19 total gem(s) (Gem::LoadError)
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/dependency.rb:307:into_spec'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_gem.rb:47:ingem'
from /usr/bin/rails:22:in <main>'
try the simple stuff first, bundle install, restoring from git depending on what your branches were. Finally you made need to just uninstall and reinstall
How can I uninstall Ruby on Rails on Mac OS X?
https://gauravsohoni.wordpress.com/2014/01/01/rvm-implode-and-rvm-install/
Versions
Mac OS: OSX 10.10.2
Ruby: 2.2.1p85
Rails: 4.2.0
Context
I am following the "Install Rails" tutorial online at www.installrails.com. Finally made it through after encountering many errors. I am on the last step of creating a sample app, which it worked fine, and then running the server. Now, I run into another error.
Errors
Here is what I am seeing:
/Users/Work/.rvm/gems/ruby-2.2.1/gems/json-1.8.2/lib/json/ext/parser.bundle: [BUG] Segmentation fault at 0x00000000000418
ruby 2.2.1p85 (2015-02-26 revision 49769) [x86_64-darwin14]
-- Crash Report log information --------------------------------------------
See Crash Report log file under the one of following:
* ~/Library/Logs/CrashReporter
* /Library/Logs/CrashReporter
* ~/Library/Logs/DiagnosticReports
* /Library/Logs/DiagnosticReports
for more details.
-- Control frame information -----------------------------------------------
*A lot of information listed here*
-- Ruby level backtrace information ----------------------------------------
*A lot of information listed here*
-- Machine register context ------------------------------------------------
*A lot of information listed here*
-- C level backtrace information -------------------------------------------
*A lot of information listed here*
-- Other runtime information -----------------------------------------------
* Loaded script: bin/rails
* Loaded features:
*And then a long list of files listed here*
[NOTE]
You may have encountered a bug in the Ruby interpreter or extension libraries.
Bug reports are welcome.
Don't forget to include the above Crash Report log file.
For details: http://www.ruby-lang.org/bugreport.html
Abort trap: 6
Help
Now, I am wondering if it is the json gem that is causing a problem?
Let me know if you need any of the removed information. The bug report was really long so I removed the codes where it says A lot of information listed here for brevity.
Per a suggestion by #maxd, I ended up having to uninstall and reinstall ruby.
Here is the process I followed.
I uninstalled Ruby with command line rvm remove 2.2.1
I reinstall 2.2.1 with the command line rvm install 2.2.1
Then I reinstalled rails with command line sudo gem install rails
Then I used bundle install to reinstall missing gems
Next, I used gem install rubygems-update to update Rubygems from 2.0.14 to 2.1.
Then I reset gems to pristine condition with gem pristine --all.
Then for some reason I had to rerun bundle install because actionmailer 4.2.0 was no longer showing as being installed, even though it was in the list after the first bundle install.
Finally running rails -v gave me an output of Rails 4.2.0 instead of error codes.
So, I ran rails server and all is well.
I solved this problem. But I not certain this is a GOOD way.
first, I reinstalled ruby. since, I looks like version problem as I see.
rvm reinstall all
and gem install rails. After this process, I can run server with rails server command.
I hope this could be a your solution too. Have a good day :D
I was experiencing the same problem in my mac mini(M1). The following solution worked for me found in the developer forum.
sudo arch -x86_64 gem install ffi
Then
arch -x86_64 pod install
I cannot seem to start rdebug on my machine.
Everything else seems to be working okay.
I've tried updating my gems without much luck.
I've tried some suggestion of setting the arch flag to x86_64 and update the gems. No luck again.
I am on a Mac OSX 10.6.6
/opt/.gem/ruby/1.8/gems/linecache-0.43/lib/../lib/trace_nums.bundle: dlopen(/opt/.gem/ruby/1.8/gems/linecache-0.43/lib/../lib/trace_nums.bundle, 9): no suitable image found. Did find: (LoadError)
/opt/.gem/ruby/1.8/gems/linecache-0.43/lib/../lib/trace_nums.bundle: no matching architecture in universal wrapper - /opt/.gem/ruby/1.8/gems/linecache-0.43/lib/../lib/trace_nums.bundle
from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:29:in `require'
Any suggestions would be of great help.
Thanks
Updating the linecache gem should fix this: sudo gem install linecache
If that doesn't cut it, it might have something to do with your gems coming from /opt/ -- mine was failing on /Library/Ruby/Gems/1.8/gems/linecache-0.43/lib/../lib/trace_nums.bundle (and re-installing linecache fixed it).
Or you could work around it by running rdebug in i386 mode:
arch -i386 rdebug ...
I was trying to use rspec and for some reason it wasn't working. I think it lacked some dependencies or something. Everything else in Ruby 1.9 was working perfectly on my laptop though. So I did a ruby gems system update (sudo gem update --system). I then did a gem update (sudo gem update). When I tried to run or create apps in rails I get the below listed error message: I also get this same message when I try to do gem update, gem install, gem clean, etc. I am confused. I even tried to update bundler to the latest version but I still get this same error message. I hope someone can help. Thanks.
demetrius-fords-macbook-pro-17:~ demet8$ gem check
/usr/local/lib/ruby/gems/1.9.1/gems/bundler-0.8.1/lib/rubygems_plugin.rb:2:in require': no such file to load -- bundler/commands/bundle_command (LoadError)
from /usr/local/lib/ruby/gems/1.9.1/gems/bundler-0.8.1/lib/rubygems_plugin.rb:2:in'
from /usr/local/lib/ruby/site_ruby/1.9.1/rubygems.rb:1113:in load'
from /usr/local/lib/ruby/site_ruby/1.9.1/rubygems.rb:1113:inblock in '
from /usr/local/lib/ruby/site_ruby/1.9.1/rubygems.rb:1105:in each'
from /usr/local/lib/ruby/site_ruby/1.9.1/rubygems.rb:1105:in'
from :225:in require'
from <internal:gem_prelude>:225:inload_full_rubygems_library'
from :324:in const_missing'
from /usr/local/bin/gem:12:in'
Your backtrace indicates that you're running Bundler 0.8.1. Please uninstall it and make sure you have a more recent version of bundler installed :)