Problems installing rdoc, irb, bluecloth, chronic on fedora 12 - ruby-on-rails

What do these errors mean?
[root#localhost config]# gem install bluecloth
Building native extensions. This could take a while...
ERROR: Error installing bluecloth:
ERROR: Failed to build gem native extension.
/usr/bin/ruby extconf.rb
can't find header files for ruby.
Gem files will remain installed in /usr/lib64/ruby/gems/1.8/gems/bluecloth-2.0.7 for
inspection.
Results logged to /usr/lib64/ruby/gems/1.8/gems/bluecloth-2.0.7/ext/gem_make.out
[root#localhost config]#
And this
[root#localhost config]# gem install chronic
Successfully installed json_pure-1.4.3
Successfully installed rubyforge-2.0.4
Successfully installed hoe-2.6.0
Successfully installed chronic-0.2.3
4 gems installed
/usr/lib64/ruby/gems/1.8/gems/rdoc-2.5.8/lib/rdoc/ruby_lex.rb:67: warning:
parenthesize argument(s) for future version
ERROR: While executing gem ... (Gem::DocumentError)
ERROR: RDoc documentation generator not installed: no such file to load -- irb/slex
[root#localhost config]#
I have installed rdocs using "yum install ruby-rdocs". But I don't understand what this error means

yum install ruby-devel ruby-irb ruby-rdoc ruby-ri
Although the former command fixes both issues, take in mind that in the case of the second error message, you can had also skip the documentation by adding --no-rdoc.
April 2017:
--[no-]rdoc argument has been deprecated as explained in gem install --help. You now have to use --no-document at each gem installation or store this in your ~/.gemrc as explained in this answer.

Related

Gem Install Rails Giving Error: Failed To Build Gem Native Exension CentOS

I know there are tons of questions like this one, but I looked at all of them I could find and none of them worked.
I just installed CentOS today, so I'm still getting used to how things worked. I installed ruby with this command:
sudo yum install ruby
Here is the full log:
Building native extensions. This could take a while...
ERROR: Error installing rails:
ERROR: Failed to build gem native extension.
current directory: /usr/local/share/gems/gems/nokogiri-1.10.10/ext/nokogiri
/usr/bin/ruby -r ./siteconf20200719-46896-88vbp9.rb extconf.rb
mkmf.rb can't find header files for ruby at /usr/share/include/ruby.h
extconf failed, exit code 1
Gem files will remain installed in /usr/local/share/gems/gems/nokogiri-1.10.10 for inspection.
Results logged to /usr/local/lib64/gems/ruby/nokogiri-1.10.10/gem_make.out
I ran sudo gem update and sudo gem update --system, but both of them gave an error too. For sudo gem update, the error message was really long so I put it in a pastebin to not clutter things which you can find here. For sudo gem update --system here is the error message:'
Updating rubygems-update
Successfully installed rubygems-update-3.1.4
Parsing documentation for rubygems-update-3.1.4
Done installing documentation for rubygems-update after 0 seconds
ERROR: While executing gem ... (Errno::ENOENT)
No such file or directory # dir_chdir - /usr/share/gems/gems/rubygems-update-3.1.4
What else do I need to do/install? You can ask me if I installed something in the comments.
I had same issue today.
After some curses, I noticed that in gem list there was rubygem-update, but with another path... not in /usr/share/gems/ but in /usr/local/share/gems
So I did
sudo ln -s /usr/local/share/gems/gems/rubygems-update-3.1.4/ /usr/share/gems/gems/rubygems-update-3.1.4
And everything was fine.

How to resolve the Rmagick installation error in windows10

While doing bundle install
collect2.exe: error: ld returned 1 exit status
make: *** [RMagick2.so] Error 1
make failed, exit code 2
Gem files will remain installed in
C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/rmagick-2.16.0 for
inspection.
Results logged to
C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/extensions/x86-mingw32/2.3.0/rmagick-2.16.0/gem_make.out
An error occurred while installing rmagick (2.16.0), and Bundler cannot
continue.
Make sure that `gem install rmagick -v '2.16.0'` succeeds before bundling.
In Gemfile:
rmagick
Then I tried gem install rmagick -v '2.16.0' which in turn throwed this error
Temporarily enhancing PATH to include DevKit...
Building native extensions. This could take a while...
collect2.exe: error: ld returned 1 exit status
make: *** [RMagick2.so] Error 1
make failed, exit code 2
Gem files will remain installed in C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/rmagick-2.16.0 for inspection.
Results logged to C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/extensions/x86-mingw32/2.3.0/rmagick-2.16.0/gem_make.out
After that i tried gem install rmagick --platform=ruby -- --with-opt-lib="C:/Program Files/ImageMagick-6.9.6-Q16-HDRI/lib" --with-opt-include="C:/Program Files/ImageMagick-6.9.6-Q16-HDRI/include" which throwed the same error as mentioned above in gem install rmagick -v '2.16.0'
Please help me out with this..
Install ImageMagick on Windows 10
Important: DON'T download the latest version of ImageMagick. It won't work with RMagick on a Windows development environment. You have to take Version: 6.7.9-9-Q16 and they have to be the 32-bit versions (even if you are on a 64-bit system). I found those versions of ImageMagick here.
STEP 1: Download and Install STATIC: ImageMagick-6.7.9-9-Q16-windows-static.exe
Set the installation path to 'C:\ImageMagick' - this is important, to avoid the common windows whitespace path bug, then just click through the rest of the installation
STEP 2: Download and Install DLL: ImageMagick-6.7.9-9-Q16-windows-dll.exe
During installation, check the checkbox to install the source headers.
Install RMagick Gem in Rails
Now go to your Rails Console (Git bash), cd to the root path of your Rails Application and enter the following command:
gem install rmagick --platform=ruby -- --with-opt-dir=C:/ImageMagick
The installation takes a while, when everything was successfull you should see:
Thats it. Don't forget to add gem 'RMagick' to your Gemfile.
If you still don't succeed, try to install:
MinGW Min GNU Windows Environment
http://www.mingw.org/
http://sourceforge.net/projects/mingw...
(make sure to install the development tools)

Error installing gem twitter on Ubuntu 15.04

Am trying to install twitter gem on Ubuntu 15.04 and this error keeps popping up
gem install twitter
Building native extensions. This could take a while...
ERROR: Error installing twitter:
ERROR: Failed to build gem native extension.
/usr/bin/ruby2.1 extconf.rb
mkmf.rb can't find header files for ruby at /usr/lib/ruby/include/ruby.h
extconf failed, exit code 1
Gem files will remain installed in /var/lib/gems/2.1.0/gems/http_parser.rb-0.6.0 for inspection.
Results logged to /var/lib/gems/2.1.0/extensions/x86-linux/2.1.0/http_parser.rb-0.6.0/gem_make.out
You are getting this error because there is no ruby development environment installed. Development environment is needed to compile ruby extensions,
You should install development first using command below:
$ sudo apt-get install ruby-dev
I had a similar issue and i solved it by installing ruby-dev:
sudo apt-get install ruby-dev

Cant run rails server

I am just getting started with ruby on rails, after installing rails executing many commands on the console, i tried to run rails server with the command rails server but gets an error about not loading coffee-rails, i tried the command gem install coffee-rails i got
gem install coffee-rails
Temporarily enhancing PATH to include DevKit...
Building native extensions. This could take a while...
ERROR: Error installing coffee-rails:
ERROR: Failed to build gem native extension.
C:/Ruby193/bin/ruby.exe -r ./siteconf20140724-4244-v083ym.rb extconf.rb
creating Makefile
make clean
Makefile:165: *** target pattern contains no `%'. Stop.
make
Makefile:165: *** target pattern contains no `%'. Stop.
make failed, exit code 2
Gem files will remain installed in C:/Ruby193/lib/ruby/gems/1.9.1/gems/json-1.8.
1 for inspection.
Results logged to C:/Ruby193/lib/ruby/gems/1.9.1/extensions/x86-mingw32/1.9.1/js
on-1.8.1/gem_make.out
RubyGems 2.4.1 will not build native extensions in Ruby version 1.9.3 and earlier on Windows.
You will need to downgrade RubyGems to 1.8.29.
To do this run the following command:
gem update --system 1.8.29
Check gem version:
gem -v
1.8.29
Now try your command again:
gem install coffee-rails
ref: https://groups.google.com/forum/#!topic/rubyinstaller/k19SeJijpKU/discussion
Take a look at this answer - they seem to have had the same trouble and had to use an older version of make.

Error installing rails, failed to build gem native extension

I know there is a couple of topics about that, but the reason I create a new one is that it still doesn't work for me ...
So here is my configuration :
ruby -v : 1.8.7
gem -v : 1.8.21
And when I try to make
sudo gem1.8 install rails
I have the following error :
Building native extensions. This could take a while...
ERROR: Error installing rails:
ERROR: Failed to build gem native extension.
/usr/bin/ruby1.8 extconf.rb
creating Makefile
make
sh: make: not found
Gem files will remain installed in /usr/lib/ruby/gems/1.8/gems/json-1.6.6 for inspection.
Results logged to /usr/lib/ruby/gems/1.8/gems/json-1.6.6/ext/json/ext/generator/gem_make.out
I'm running on Debian 6.0.4 Squeeze.
Thanks in advance for your answers !
You don't have make command, as your output says. In debian install package build-essential
I think gcc or c-compiler isn't install or not writen in environment path, I've got same problem while installing rails, but after Install gcc, I can install rails very well.

Resources