RedCloth Installation failed - ruby

i was trying to install octopuses, but i got stuck installing RedCloth (http://redcloth.org). I think the problem is the same of this one, but that's the solution for windows and i run OSX (10.8).
--redacted--

Try installing the ruby1.9.1-dev package from Synaptic, or using apt-get.
In a command prompt:
sudo apt-get install ruby1.9.1-dev
and then:
if you are using Bundler gem, which I suppose, you can type bundle install to install it, otherwise you can manually install it via gem install RedCloth

Related

Error occured while installing unf_ext (0.0.7.4), and Bundler cannot continue

My ultimate goal is to get this to work in an Ubuntu 14.04 Docker container: https://github.com/byalextran/autoluv
When I run
m1#9bdc67007b49:~/autoluv$ bundle install --deployment
It says:
Fetching unf_ext 0.0.7.4
Installing unf_ext 0.0.7.4 with native extensions
Errno::EACCES: Permission denied # rb_sysopen - /home/m1/autoluv/vendor/bundle/ruby/2.4.0/gems/unf_ext-0.0.7.4/.document
An error occurred while installing unf_ext (0.0.7.4), and Bundler cannot continue.
Make sure that `gem install unf_ext -v '0.0.7.4' --source 'https://rubygems.org/'` succeeds before bundling.
But when I run
sudo gem install unf_ext -v '0.0.7.4' --source 'https://rubygems.org/'
unf_ext-0.0.7.4 installs fine?
Building native extensions. This could take a while...
Successfully installed unf_ext-0.0.7.4
1 gem installed
Installing ri documentation for unf_ext-0.0.7.4...
Installing RDoc documentation for unf_ext-0.0.7.4...
I cannot figure out the next step. I've tried installing ruby-dev and gcc, but neither has helped move this along :(
Any and all help is much appreciated!
I had this same problem and the reason was that I did not installed all the dependencies that bundler needs to run
just try to:
sudo apt-get install build-essential
then run again
gem install bundler
and lastly
bundler
There is a difference between running commands with sudo and without. You can get more info about this command here https://kb.iu.edu/d/amyi.
Errno::EACCES usually happens when bunder has no access to a needed folder or it doesn't exist.
Try to gem install unf_ext -v '0.0.7.4' --source 'https://rubygems.org/' without sudo.
I had same issue on Fedora.
I simply had to install the gcc-c++ package.
I solved this error on Debian 10 buster in my ChromeOS Linux container by installing rbenv: sudo aptitude install rbenv or sudo apt install rbenv.
Aptitude package manager seems to be better at resolving dependencies and allowing me to install newer packages more easily than the default apt so I thought it was worth mentioning.
Solved it after using following commands for Xcode 13, BigSur :
softwareupdate --install a
sudo port upgrade outdated
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew install wget
brew install build-essentials
bundler install
If you are an iOS developer who is getting this error, this might be related to your Xcode command line tools selection.
Just run the following command with the path of the Xcode that you are using currently.
sudo xcode-select --switch /Applications/Xcode.app
You need to use the latest version of Ruby.
If you are using MacOS, system Ruby is old and outdated. you can not update the system Ruby, but you can install another version of Ruby and make it default global using rbenv ruby version manager tool.
finally you can install any ruby packages you like.

Gem / Metasploit Install error: An error occurred while installing pg (0.18.4)

Keep getting the attached error when trying to install metasploit dependant gems on OS X EL Capitan. Have tried reinstalling postgres etc, not sure how to fix this is issue.
An error occurred while installing pg (0.18.4), and Bundler cannot continue.
Make sure that `gem install pg -v '0.18.4'` succeeds before bundling.
Error
I had the same issue and following steps worked wonder for me,
First thing is updating your Xcode Tools as you are on Mac OX.
Then install Postgre via Homebrew. (Here is a link on guidelines)
You'll need to uninstall it first,
brew uninstall postgresql
or you can update it with
brew update
And reinstall with
brew install postgresql
Now you can run, gem install pg successfully.
Let me know if I'm missing on something.
1) install postgresql
2) install postgresql-dev
2) install gem install pg

Failed to build gem native extension when install RedCloth-4.2.9 install Linux

I want to install Octopress in my computer.
I try to do it like
Octopress document.
When I run
bundle install
I got error message
An error occured while installing RedCloth (4.2.9), and Bundler cannot continue.
Make sure that `gem install RedCloth -v '4.2.9'` succeeds before bundling.
So, I run
sudo gem install RedCloth -v '4.2.9'
then, I got a error message again:
ERROR: Error installing RedCloth:
ERROR: Failed to build gem native extension.
/usr/bin/ruby1.9.1 extconf.rb
/usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require': cannot load such file -- mkmf (LoadError)
from /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from extconf.rb:1:in `<main>'
I hadn't learn any knowledge about ruby.
My ubuntu 12.04 solution is install the ruby1.9.1-full version, that can resolve this issue.
sudo apt-get install ruby1.9.1-full
you can execute command:
sudo update-alternatives --config ruby
to select the altiernative ruby which you have installed.
and then, execute below commands to finish the octopress deploy:
git clone https://github.com/erizhang/octopress.git octopress
cd octopress/
sudo gem install bundler
sudo gem install RedCloth -v '4.2.9'
bundle install
rake install
below commands you can find from octopress deploy guideline page:
rake setup_github_pages
sudo rake setup_github_pages
sudo rake generate
sudo rake deploy
Hope it's helpful for you, thanks
I was installing Octopress too and got the same problem as yours. After checking the mkmf.log file I figured out that gcc-4.2 had not been found. I Even installed xcode with the command line tools. It worked when I made a symlink like this:
$ sudo ln -s /usr/bin/gcc /usr/bin/gcc-4.2
$ bundle install
I fixed this issue by running
sudo apt-get install ruby-dev
as described in this blog post.
You've probably upgraded to Mountain Lion and have not rebuilt your ruby-1.9.2 install yet with the new development packages.
rvm --force install 1.9.2
gem install bundle --no-ri --no-rdoc
bundle install
If you don't have the Mountain Lion dev packages installed correctly, use the ThoughtBot instructions.
For Ubuntu 14.04 simply do this:
sudo apt-get install ruby1.9.3
Should work for 13.10 and 13.04 too. (Not tested)
it apears you are not using rvm for managing your ruby installation. I think best would be to try rvm, here's a very good guide, you can stop without installing rails: ruby with rvm
Then simply
$gem install RedCloth
Unmanaged ruby gems are a pain, I try to avoid them.
None of the answers worked on my Ubuntu 14.04.1 LTS. Upgrade to ruby 2.0 fixed the problem for me:
sudo apt-get install ruby2.0 ruby2.0-dev
sudo ln -s /usr/bin/ruby2.0 /usr/bin/ruby
sudo ln -s /usr/bin/gem2.0 /usr/bin/gem
sudo gem install bundler
Make sure you also have the build-essential package installed. You can check using
dpkg -l | grep build-essential
or simply install it without checking
sudo apt-get install build-essential
For me on Ubuntu 14.04.1 LTS, after making sure build-essential is installed, the bundle install command works/builds fine also with Ruby 1.9.3.

Error with rhc-create-domain on command line (Openshitft)

First I do not know much about Ruby, but, the Openshit command line uses the 'rhc' to manage my apps on cloud. Nice!...but the 'rhc' program its based on Ruby, Rubygems....something.
Ok, i'm installed theses programs with apt-get on Linux Mint (Ubuntu based):
sudo apt-get install ruby1.8
sudo apt-get install gem
sudo apt-get install rubygems
gem install json_pure
gem install rake
gem install rhc
Nice!..rhc its visible in my console, but when i try execute any rhc command, the console returns for me this:
rhc-create-domain -n carlosjr -l carlosjrcabello#gmail.com
/usr/local/lib/site_ruby/1.8/rubygems/dependency.rb:247:in `to_specs': Could not find rhc (>= 0) amongst [json-1.6.6, json_pure-1.6.6, mime-types-1.18, parseconfig-0.5.2, rest-client-1.6.7] (Gem::LoadError)
from /usr/local/lib/site_ruby/1.8/rubygems/dependency.rb:256:in `to_spec'
from /usr/local/lib/site_ruby/1.8/rubygems.rb:1231:in `gem'
from /usr/local/bin/rhc-create-domain:18
Remembering, i do not know if I have to update something in ruby or RubyGem.
No more for now. Thanks.
I solved the problem. The Linux Mint 12 (Lisa) with KDE contains the basic Ruby packages installed, so I purged all ruby packages before installing all required RHC apps. Here is my solution (in command line):
sudo apt-get purge ruby* (caution with grub packages)
sudo reboot
sudo apt-get install ruby1.8
sudo apt-get install gem
sudo apt-get install rubygems
gem install json_pure
gem install rake
gem install rhc
All rhc functionalities should now be working.
PS: I think that Openshift can be explain more the install process of Ruby apps..using my case for example, I dont have anything knowledge of Ruby :/
I had the same error message on Ubuntu 12.04. In my case the problem was /var/lib/gems/ was not world readable.

Ruby: Installing rmagick on Ubuntu

I'm trying to get RMagick setup on Ubuntu 10.04. Looked here but had no joy. I even compiled and installed ImageMagick from source, but the instructions here still didn't help me when I try to install RMagick using RubyGems. I got this error:
carcher#carcher-laptop:~/Code/temp/RMagick-2.13.1$ sudo gem install rmagick
Building native extensions. This could take a while...
ERROR: Error installing rmagick:
ERROR: Failed to build gem native extension.
/usr/bin/ruby1.8 extconf.rb
extconf.rb:1:in `require': no such file to load -- mkmf (LoadError)
from extconf.rb:1
Gem files will remain installed in /usr/lib/ruby/gems/1.8/gems/rmagick-2.13.1 for inspection.
Results logged to /usr/lib/ruby/gems/1.8/gems/rmagick-2.13.1/ext/RMagick/gem_make.out
carcher#carcher-laptop:~/Code/temp/RMagick-2.13.1$
What does it all mean? :) I'm new to Ruby and RubyGems so please be gentle. My setup is as follows:
Ruby: 1.8.7
RubyGems: 1.3.7
I'm pretty much out of ideas (and tired too!). I tired to compile RMagick from source using the link above but it failed as there was no ./configure script :(
Any and all help appreciated!
Install the packages imagemagick and libmagickwand-dev (or libmagick9-dev). You should then be able to install the Rmagick Gem.
sudo apt-get install imagemagick libmagickwand-dev
If not, you are missing ruby related development packages like build-essential and ruby1.8-dev. If that's the case, a generic "ubuntu install ruby 1.8" query in google should sort you out.
You don't need a lot of the other junk in these answers, just:
sudo apt-get install libmagickwand-dev
On Ubuntu 12.04 libmagick9-dev is gone. graphicsmagick-libmagick-dev-compat should be used instead.
apt-get install graphicsmagick-libmagick-dev-compat
On Ubuntu 15.04, what solved it for me was to remove all previous *magick installations, reinstall required packages and then symlink the config file:
sudo apt-get purge graphicsmagick graphicsmagick-dbg imagemagick-common imagemagick imagemagick-6.q16 libmagickcore-6-headers libmagickwand-dev graphicsmagick-libmagick-dev-compat
sudo apt-get autoremove
sudo apt-get install imagemagick libmagickwand-dev
sudo ln -s /usr/lib/x86_64-linux-gnu/ImageMagick-6.8.9/bin-Q16/Magick-config /usr/bin/Magick-config
gem install rmagick
In Ubuntu 14.04
Below code is worked for me
sudo apt-get install imagemagick libmagickcore-dev libmagickwand-dev
Then,
gem install rmagick
On Ubuntu 12.0.4.2 sudo apt-get install libmagickwand-dev libmagickcore-dev libmagickcore4-extra libgraphviz-dev libgvc5 worked for me.
graphicsmagick-libmagick-dev-compat installed but didn't include the header files so rmagick wouldn't compile.
Please note, you need to remove graphicsmagick-libmagick-dev-compat before running the command above.
this worked for me...
sudo apt-get install graphicsmagick-libmagick-dev-compat libmagickwand-dev
gem install rmagick
...
Building native extensions. This could take a while...
Successfully installed rmagick-2.13.1
1 gem installed
(ubuntu 12.0.4 64bit)
You got message extconf.rb:1:in 'require': no such file to load -- mkmf (LoadError) because package ruby1.8-dev isn't installed. Install it (sudo apt-get install ruby1.8-dev) and try again.
In Ubuntu 13.10
This code worked for me
sudo apt-get install graphicsmagick-libmagick-dev-compat libmagickwand-dev
gem install rmagick
To get bundle to stop failing on ubuntu 12.04.
apt-get install graphicsmagick-libmagick-dev-compat libmagickwand-dev
This is my gemfile
gem 'rmagick'
gem 'mini_magick'
On Ubuntu, you can run:
sudo apt-get install libmagickwand-dev
On Centos, you can run:
sudo yum install gcc ImageMagick-devel make which
Then install
gem install rmagick
If you want to try installing the native deb package instead of the gem, be aware that the librmagick-ruby was broken on Ubuntu 10.04 until just very recently:
https://bugs.launchpad.net/ubuntu/+source/librmagick-ruby/+bug/518122
See comment #17 in particular. I believe this has already been fixed so now apt-get install librmagick-ruby might "just work". Otherwise here's how to build it yourself from source
$ cd /usr/src
$ sudo apt-get build-dep librmagick-ruby
$ sudo apt-get source librmagick-ruby
$ cd librmagick-ruby-2.11.1
$ sudo dch -i
(add changelog entry)
$ sudo dpkg-buildpackage
$ cd ..
$ sudo dpkg -i librmagick-ruby*.deb
In ubuntu 16.04.3:
This i worked:
sudo apt install imagemagick imagemagick-6.q16
It means this installed imagemagick then you can run RMagick.
If you are using Linux then simply run these commands.
sudo apt-get install imagemagick libmagickwand-dev
and then
bundle install
Hope this will resolve your issue.
And if you are using mac then simply run following commands
First of all unlink your installed imagemagick which was not properly installed in latest mac high sierra by using.
brew unlink imagemagick
then install latest imagemagic6 using below command
brew install imagemagick#6 && brew link imagemagick#6 --force
Then install gem rmagick using below command
gem install rmagick
bundle install
It will work perfectly fine.
Follow below 3 steps proven on UBUNTU 16.04
sudo apt-get install build-essential imagemagick libmagickwand-dev
#In .bashrc or .bash_profile add below code. Just check the ImageMagick dir name.
export PATH="/usr/lib/x86_64-linux-gnu/ImageMagick-6.8.9/bin-Q16:$PATH"
gem install rmagic #Install Gem

Resources