On my new OSX Mavericks install, I wanted to give Rubymine a try and just can't get the debugger working (although i managed to get it working on Windows 7 with IntelliJ and the ruby plugin).
Here's what I did (XCode and commandline tools already installed):
homebrew install ruby
gem update --system
Then I installed Rubymine and opened some of my projects. Upon starting the debugger, rubymine tries to install dependencies:
Failed to Install Gems. Following gems were not installed:
/Applications/RubyMine.app/rb/gems/ruby-debug-ide-0.4.22.gem: Error
installing ruby-debug-ide-0.4.22.gem: ERROR: Failed to build gem
native extension.
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby
mkrf_conf.rb Installing base gem You don't have write permissions for
the /Library/Ruby/Gems/2.0.0 directory.
/Library/Ruby/Site/2.0.0/rubygems/installer.rb:620:in
verify_gem_home'
/Library/Ruby/Site/2.0.0/rubygems/installer.rb:740:in
pre_install_checks'
/Library/Ruby/Site/2.0.0/rubygems/installer.rb:213:in install'
/Library/Ruby/Site/2.0.0/rubygems/request_set.rb:136:inblock in
install' /Library/Ruby/Site/2.0.0/rubygems/request_set.rb:120:in
each' /Library/Ruby/Site/2.0.0/rubygems/request_set.rb:120:in
install'
/Library/Ruby/Site/2.0.0/rubygems/dependency_installer.rb:389:in
install' mkrf_conf.rb:34:inrescue in ' mkrf_conf.rb:27:in ` ' rake
failed, exit code 1 Gem files will remain installed in /Volumes/OSX
DATA/Users/freakazoid/.gem/ruby/2.0.0/gems/ruby-debug-ide-0.4.22 for
inspection. Results logged to /Volumes/OSX
DATA/Users/freakazoid/.gem/ruby/2.0.0/extensions/universal-darwin-13/2.0.0/ruby-debug-ide-0.4.22/gem_make.out
/Applications/RubyMine.app/rb/gems/debase-0.0.9.gem: Error installing
debase-0.0.9.gem: ERROR: Failed to build gem native extension.
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby
extconf.rb
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby:
invalid option -D (-h will show valid options) (RuntimeError) extconf
failed, exit code 1 Gem files will remain installed in /Volumes/OSX
DATA/Users/freakazoid/.gem/ruby/2.0.0/gems/debase-0.0.9 for
inspection. Results logged to /Volumes/OSX
DATA/Users/freakazoid/.gem/ruby/2.0.0/extensions/universal-darwin-13/2.0.0/debase-0.0.9/gem_make.out
I can without problems do a
gem install debugger
on my osx terminal
Any help out there?
You need to get the source files since they aren't included.
gem install debugger-ruby_core_source
Then try again.
Also, since I've found this sometimes isn't set correctly in Rubymine, in the menu bar go to "Rubymine" -> "preferences" -> "Ruby SDK and Gems" and make sure it is pointed to the version of Ruby you are expecting.
Thanks Beartech, you pointed me to the right direction:
Rubymine was looking for ruby in "/Library/..../ruby" and homebrew of course had ruby installed to another location. I had to edit my rubymine settings and point the ruby sdk to homebrew's ruby. Then i had to restart rubymine in order to successfully use the new sdk location. (I had previousl not restartet rubymine ...)
Related
I am trying to install gem json and getting error for json.
I'm running:
Windows 8.1 (64 bit)
Ruby: ruby 1.9.3p545 (2014-02-24) [i386-mingw32]
gem: 1.8.2
D:\GIT\calabash>gem install json -v '1.8.3'
Building native extensions. This could take a while...
The system cannot find the path specified.
ERROR: Error installing json:
ERROR: Failed to build gem native extension.
C:/Ruby193/bin/ruby.exe extconf.rb
creating Makefile
Gem files will remain installed in C:/Ruby193/lib/ruby/gems/1.9.1/gems/json-1.8.3 for inspection.
Results logged to C:/Ruby193/lib/ruby/gems/1.9.1/gems/json-1.8.3/ext/json/ext/generator/gem_make.out
D:\GIT\calabash>
Its a late response, but may it helps someone else. to install json '1.8.3' it requires packages 'libgmp3-dev'.
Use following steps:
sudo apt-get install libgmp3-dev
gem install json -v '1.8.3'
For anyone who has this issue on Sierra, I solved the problem through this thread: https://teamtreehouse.com/community/installing-ruby-on-mac-got-error
Coles notes version is that after updating to most recent version of XCode, I had to accept the terms for the XCode command line tools. See them/agree to them by running:
gcc --version
After I did that, everything installed as expected.
To help you here are some steps to follow in order to install your gem locally:
Download json-1.8.3.
Place the downloaded gem into a folder called gems
Open the Ruby cmd console (click on start button, select Ruby then select "Start command prompt with Ruby")
cd to the gems folder. If the path to the folder is C:\Desktop\gems, write the command: cd C:\Desktop\gems then click "Enter".
To install the gem run the following command:
gem install --local json-1.8.3.gem
I tried it and it worked for me, hopefully it will work for you.
Result:
Second way:
Include the whole path of the gem in the command:
gem install --local C:\Users\kedarl\Desktop\T\json-1.8.2.gem
For me here is the result. (This time with the json-1.8.2.gem):
I've solved this by installing Command Line Tools Xcode of the version I have. I hope this helps someone else.
If you installed Rails through RailsInstaller, try this -
https://gist.github.com/luislavena/f064211759ee0f806c88
It's a pretty common bug for RailsInstaller currently.
I have tried to install atomic gem via bundler. I'm getting the below error message:
**Installing atomic 1.1.13 with native extensions The system cannot find the path specified.
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native
extension.
c:/Ruby200/bin/ruby.exe extconf.rb
creating Makefile
Gem files will remain installed in
c:/Ruby200/lib/ruby/gems/2.0.0/gems/atomic-1.1.13 for inspection.
Results logged to
c:/Ruby200/lib/ruby/gems/2.0.0/gems/atomic-1.1.13/ext/gem_make.out An
error occurred while installing atomic (1.1.13), and Bundler cannot
continue.**
Could you help me to overcome from this issue. Thanks
To help you here are some steps to follow in order to install your gem lacally.
Download atomic 1.1.13 from RubyGems:
atomic 1.1.13
Place the downloaded gem into a file called gems
Open Ruby cmd consol [clic on start button, select Ruby then select Start command prompt with Ruby]
Cd to the gems file path [lets supose the path of your gems file is C:\Desktop\gems] write the command: cd C:\Desktop\gems then clic enter.
To install the gem run the following comand: gem install --local atomic-1.1.13.gem
I tried it and it worked for me, hopefuly it will work for you.
I installed compass and sass and everything worked correctly. But now I am trying to install singularity and breakpoint and I am getting this error over and over:
Sayras-iMac:~ sayralopez$ sudo gem install breakpoint
Building native extensions. This could take a while...
ERROR: Error installing breakpoint:
ERROR: Failed to build gem native extension.
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby extconf.rb
mkmf.rb can't find header files for ruby at /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/ruby.h
extconf failed, exit code 1
Gem files will remain installed in /Library/Ruby/Gems/1.8/gems/ffi-1.9.3 for inspection.
Results logged to /Library/Ruby/Gems/1.8/extensions/universal-darwin-12/1.8/ffi-1.9.3/gem_make.out
I am still a newb at terminal commands, so I have no idea what is going on. I tried reinstalling and updating ruby and it still wont work. Any idea what could be going on and how to fix it?
MANY THANKS!
Install Ruby Version Manager first:
$ ruby install rvm
After installing rvm, I was able to install breakpoint and sigularity (and susy!)
Hope that helps!
I'm trying to install vagrant on MacOS (Lion). But it keeps failing.
What happens...
sudo gem update --system
sudo gem install vagrant
Building native extensions. This could take a while... ERROR: Error
installing vagrant: ERROR: Failed to build gem native extension.
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby
extconf.rb mkmf.rb can't find header files for ruby at
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/ruby.h
Gem files will remain installed in
/Library/Ruby/Gems/1.8/gems/ffi-1.0.11 for inspection. Results logged
to /Library/Ruby/Gems/1.8/gems/ffi-1.0.11/ext/ffi_c/gem_make.out
I have XCode installed (installed it this morning from the AppStore).
Any ideas how I can fix this?
The problem was that XCode 4.3 doesn't in command line tools by default (not sure if this is the first version that doesn't do this). Installing them got it working.
Command Line Tools can be installed by going to Preferences > Downloads > Components.
I'm not sure why your build was failing, but starting with Vagrant 1.0 (not released yet, but RCs are out), the preferred installation method will be packages, so you can just download a pkg for Mac and install, even without XCode installed: http://downloads.vagrantup.com/
Running with Ruby 1.9.2
The IDE complains that The gem ruby-debug-base19x is required and offers to install it.
However, upon attempting to install it it displays the message
Failed to install gems. Following gems were not installed: C:/Program
Files (x86)/JetBrains/RubyMine
3.2.4/rb/gems/ruby-debug-base19x-0.11.30.pre2.gem: Error installing ruby-debug-base19x-0.11.30.pre2.gem: The 'linecache19' native gem
requires installed build tools. Please update your PATH to include
build tools or download the DevKit from
'http://rubyinstaller.org/downloads' and follow the instructions at
'http://github.com/oneclick/rubyinstaller/wiki/Development-Kit'
C:/Program Files (x86)/JetBrains/RubyMine
3.2.4/rb/gems/ruby-debug-ide-0.4.17.beta8.gem: Error installing ruby-debug-ide-0.4.17.beta8.gem: The 'ruby-debug-ide' native gem
requires installed build tools. Please update your PATH to include
build tools or download the DevKit from
'http://rubyinstaller.org/downloads' and follow the instructions at
'http://github.com/oneclick/rubyinstaller/wiki/Development-Kit'
linecache19 (0.5.12): Error installing linecache19: The 'linecache19'
native gem requires installed build tools. Please update your PATH to
include build tools or download the DevKit from
'http://rubyinstaller.org/downloads' and follow the instructions at
'http://github.com/oneclick/rubyinstaller/wiki/Development-Kit'
I followed its advice to download the DevKit - but the DevKit upon attempting to install, said that it was already correctly installed as part of Ruby.
Any advice?
The problem is not specific to RubyMine, I'd try to reinstall Ruby and DevKit from scratch.
Verify that DevKit actually works using a test from the installation guide:
gem install rdiscount --platform=ruby
ruby -rubygems -e "require 'rdiscount'; puts RDiscount.new('**Hello RubyInstaller**').to_html"
If it works fine, try to install the debug gems manually from the console using the following commands:
gem install ruby-debug-base19x --pre
gem install ruby-debug-ide --pre
Post logs, provide more details if it still doesn't work for you.
The gem that rubymine debugger installs by itself conflicts with the existing debug gem in the gemset. Uninstall the existing debug gems, you can get a list by running gem list | grep debug and let rubymine install its own version. Also make sure that you do not have a debug gem mentioned in the Gemfile and also there should not be any debug gem in the global gemset.
I had the same problem.
i was able to get it working by uninstalling and reinstalling RubyMine. Then everything worked perfectly, as expected.
There is an open issue on this at the RubyMine forum. The answer by Roman Melnik worked for me (but my environment is Mac OS).