I'm trying to install watir-webdriver by using gem install watir-webdriver on Linux. I have installed ruby 1.8.6, activesupport 2.3.8 as well as firewatir. However, when I try to install watir-webdriver, I get the following error:
Building native extensions. This could take a while...
ERROR: Error installing watir-webdriver:
ERROR: Failed to build gem native extension.
/usr/bin/ruby extconf.rb
can't find header files for ruby.
(btw, for a bit of context - I'm a complete Linux newbie)
Assuming you installed ruby with yum, you'll need the rpm for development headers.
sudo yum install ruby-devel
and try again.
Related
I'm using Debian 5
Ruby version 1.8.7
Rubygems version 2.0.3
Rails version 3.2.12
I made my Ruby on Rails app and want to deploy it publicly, so I tried to install "Mongrel" without any luck and then "Unicorn" also without any luck and same error.
vps1198019:~# gem install mongrel
Building native extensions. This could take a while...
ERROR: Error installing mongrel:
ERROR: Failed to build gem native extension.
/usr/bin/ruby1.8 extconf.rb
Gem files will remain installed in /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5 for inspection.
Results logged to /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/ext/http11/gem_make.out
and
vps1198019:~# gem install unicorn
Building native extensions. This could take a while...
ERROR: Error installing unicorn:
ERROR: Failed to build gem native extension.
/usr/bin/ruby1.8 extconf.rb
Gem files will remain installed in /usr/lib/ruby/gems/1.8/gems/kgio-2.8.0 for inspection.
Results logged to /usr/lib/ruby/gems/1.8/gems/kgio-2.8.0/ext/kgio/gem_make.out
Try using below command. Because of version mismatch, gem is not installed.
$ gem install mongrel --pre
So I found a solution for my problem by installed it more manually. I downloaded Unicorn from http://rubyforge.org/frs/?group_id=1306 (.gem file). Stored it in server. Went to that folder with terminal. Then I accessed it with
gem install --local unicorn.gem
Then it prompted that I must have kgio and raindrops so I installed them:
gem install kgio
gem install raindrops
and repeated first command.
I have installed Ruby on Rails on my Ubuntu 10.04 Server by official tutorial: https://help.ubuntu.com/10.04/serverguide/C/ruby-on-rails.html
But I have some troubles with it. Please, help me!
1) I can't install ANY gem!
sudo gem install sqlite3-ruby
returns
ERROR: Error installing sqlite3-ruby:
ERROR: Failed to build gem native
extension.
/usr/bin/ruby1.8 extconf.rb
extconf.rb:3:in `require': no such
file to load -- mkmf (LoadError) from
extconf.rb:3
Gem files will remain installed in
/var/lib/gems/1.8/gems/sqlite3-1.3.3
for inspection. Results logged to
/var/lib/gems/1.8/gems/sqlite3-1.3.3/ext/sqlite3/gem_make.out
2) When i'am trying to get Rails version by command
rails -v
Server prints:
getopt: invalid option -- 'v'
Terminating...
If you are not set on using the packages in the Ubuntu repos(and I see no reason why you'd be), I'd suggest following this guide:
http://ryanbigg.com/2010/12/ubuntu-ruby-rvm-rails-and-you
Consider going through and making sure your sqlite3 libraries are installed. It looks as though you may be missing the required dependencies to build your gem. In this case you might try running this before installing your gem:
sudo apt-get install libsqlite3-dev
Also, try
rails --version
instead.
gem install fastthread -v1.0.7
Building native extensions. This could take a while...
ERROR: Error installing fastthread:
ERROR: Failed to build gem native extension.
/usr/bin/ruby1.8 extconf.rb
extconf.rb:8:in `require': no such file to load -- mkmf (LoadError)
from extconf.rb:8
Gem files will remain installed in /var/lib/gems/1.8/gems/fastthread-1.0.7 for inspection.
Results logged to /var/lib/gems/1.8/gems/fastthread-1.0.7/ext/fastthread/gem_make.out
This is what I got when I tried installing from fastthread to set up SUP mail client on my system . How to get rid of this error?
Install these and then try re-installing:
sudo apt-get install ruby1.8-dev
Try this link http://kenno.wordpress.com/2009/07/25/fixed-extconf-rb8in-require-no-such-file-to-load-mkmf-loaderror/
I was getting this same error in OS X Lion. Having Xcode 4.3 installed doesn't cut it. You have to go to preferences in Xcode and install the command line tools, which installs the necessary compiler tools for doing native builds on the system. After I did this, then gem install fastthread worked for me.
Just to add to this, on debian and ubuntu the "complete" ruby package is this:
ruby1.8 ruby1.8-dev ri1.8 rdoc1.8 irb1.8 ruby1.8-elisp
ruby1.8-examples libdbm-ruby1.8 libgdbm-ruby1.8 libtcltk-ruby1.8
libopenssl-ruby1.8 libreadline-ruby1.8
So something like
sudo aptitude install ruby1.8 ruby1.8-dev ri1.8 rdoc1.8 irb1.8 ruby1.8-elisp ruby1.8-examples libdbm-ruby1.8 libgdbm-ruby1.8 libtcltk-ruby1.8 libopenssl-ruby1.8 libreadline-ruby1.8
Will save you a lot of time when doing bundle install on a large project.
I am trying to get a decent navigation between my methods in TextMate. I would love to have a list of them in a drawer, but I guess there is no such solution yet, right? Therefore I am trying to set up RubyAMP to work with Ruby 1.9.1-p378 installed via RVM, but have some troubles. RubyAMP needs ruby-debug, and here is what I get if I try to install the gem
$ rvm gem install ruby-debug
info: ruby-1.9.1-p378: ruby 1.9.1p378 (2010-01-10 revision 26273) [x86_64-darwin10]
Building native extensions. This could take a while...
ERROR: Error installing ruby-debug:
ERROR: Failed to build gem native extension.
/Users/andrei/.rvm/rubies/ruby-1.9.1-p378/bin/ruby extconf.rb
Can't handle 1.9.x yet
*** extconf.rb failed ***
However, the gem page says that it should work with 1.9.x. How can I fix it?
Try this(from https://rvm.io/support/troubleshooting):
rvm gem install ruby-debug19 -- --with-ruby-include="$rvm_src_path/ruby-1.9.1-p378/"
The latest ruby 1.9.2-p0 runs gem install ruby-debug19 without a hitch.
For the latest ruby 1.9.2-preview3
gem install ruby-debug19 -- --with-ruby-include="$rvm_src_path/ruby-1.9.2-preview3"
Watir's site says I need Ruby 1.8.6, which I'm running. And windows installation should be as simple as gem install watir. But when I run that, I get this:
C:\Users\Ryguy\Code>gem install watir
Building native extensions. This could take a while...
ERROR: Error installing watir:
ERROR: Failed to build gem native extension.
C:/Ruby/bin/ruby.exe extconf.rb
checking for strncpy_s()... no
creating Makefile
make
'make' is not recognized as an internal or external command,
operable program or batch file.
Gem files will remain installed in C:/Ruby/lib/ruby/gems/1.8/gems/win32-api-1.4.5 f
Results logged to C:/Ruby/lib/ruby/gems/1.8/gems/win32-api-1.4.5/ext/gem_make.out
My Ruby Version: ruby 1.8.6 (2009-08-04 patchlevel 383) [i386-mingw32]
My RubyGems Version: 1.3.5
I would recommend you install the RubyInstaller Development Kit as documented here
Once you've installed it, the compile process of Watir dependencies (win32-api) will install successfully.
Turns out I needed to install the Ruby Development files. =/
Execute Below command and its works
gem install watir --platform=mswin32
Installed devkit and after calling the bat file on Windows 7 from a cmd it fixed this issue. Using Ruby 1.9.1
I also had to install nokogiri to get Watir to install successfully on windows, after installing DevKit. Use: gem install nokogiri