I tried to install the package "capistrano" on a linux box but got the following error:
*** buffer overflow detected ***: /usr/bin/ruby terminated
Additionally it showed me a list of the memory map and then the install process was aborted.
Any idea on what causes this error?
Cheers
Roland
I had similar issue when installing Capistrano on CentOs 6.7, Ruby 1.8.5, gem 1.3.1. Turns out the issue was caused by newest highline package.
The following allowed me to install capistrano correctly:
gem install highline --version "=1.6.2"
gem install capistrano --version "=2.6.0"
This error may be related to some Ruby 1.8.6 bugs (see this post http://opsrealism.tumblr.com/post/4931621276/mirroring-rubygems-and-ruby-9-2-on-centos-5-5 for some more details), so you may try to upgrade your Ruby to 1.8.7, if it's possible.
Another option is to try to install a bit older version of gem - it worked for me on a couple of occasions, where exact gem versions didn't matter. For example,
gem install capistrano --version "=2.7.0"
might work.
I'm running:
Centos 5.5
Ruby 1.8.5
Gems 1.3.1
I narrowed the problem down to the highline gem. Although I attempted to intall all of its dependencies manually (which worked), it still failed to load itself unless I followed the above advice and specified the version, 1.6.2. =(
gem install highline --version "=1.6.2"
Hopefully, I'll be migrating off of this ancient OS soon.
I had similar issues installing cap for CentOS 5.8 but it worked using the rvm installer (to upgrade to latest ruby, I used 1.9.2p320 (2012-04-20 revision 35421) [x86_64-linux])
What I d
I yum remove ruby (to get rid of 1.8.x)
I followed simple instructions at https://rvm.io/rvm/install/ for installing rvm
gem install capistrano
cap command is found!
Hope this helps someones
Related
I'm trying to install github pages gem on my Mac OS X (yosemite).
I get following error:
Gem::InstallError: github-pages requires Ruby version ~> 2.0.0.
An error occurred while installing github-pages (4), and Bundler cannot continue.
Make sure that `gem install github-pages -v '4'` succeeds before bundling.
I checked my Ruby version by running following command -
ruby --version
And it says
ruby 2.1.2p95 (2014-05-08 revision 45877) [x86_64-darwin13.0]
So I definitely have Ruby version ~> 2.0.0
Any assistance on this issue would be greatly appreciated!
There is a possible lack of important information here. Looking at your Ruby version, are you using rbenv or rvm?
I could imagine this happening if you use rbenv or rvm and then su or sudo to gem install github-pages. rbenv and rvm are specific to your user account and your shell environment. If you su or sudo to root, rbenv and rvm are no longer active.
The other possibility is that you are running it inside of a Bundler managed app that specifies another Ruby version in the Gemfile using the ruby x.x.x syntax.
If neither of these is the case, try running gem env to see what exactly rubygems thinks the story is. Also post the exact commands you are using to get this error.
After installing pik and changing my Ruby version to 2.0.0, bundler no long works properly
C:\Users\Me\Documents\Work Projects\Application>bundle install
Fetching gem metadata from https://rubygems.org/.........
Fetching gem metadata from https://rubygems.org/..
Using rake (10.1.0)
Using i18n (0.6.5)
Using minitest (4.7.5)
Using multi_json (1.8.0)
Installing atomic (1.1.14)
Gem::InstallError: The 'atomic' 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'
An error occurred while installing atomic (1.1.14), and Bundler cannot continue.
Make sure that `gem install atomic -v '1.1.14'` succeeds before bundling.
Installing the devkit from Ruby Installer sort of defeats the reason why I went to the trouble of installing pik. How can I fix this, so that in the future, I can easily update ruby using pik and still have everything working?
I had the same problem - if you follow the instructions listed (ie installing devkit and following their directions [they don't actually tell you to use rubyinstaller]), you'll be fine. Also make sure that during the init phase of the Devkit instructions that it doesn't miss any of your ruby installations.
A note though, it seems that pik can't specify the x64 version of 2.0.0, so you may run into problems if that's the case. In the end I had to use the rubyinstaller for the x64 version of ruby, and then ran the x64 version of the devkit.
Hope this helps.
I think Josh' answer is probably right, but I actually installed Ubuntu as a VM in the end, just so I could use RVM.
RVM is a thousand times better than Pik, and it installs the DevKit. It's so good it's genuinely worth installing Ubuntu just so you can use it.
I want to build passenger-3.0.19 apache2 module on a debian squeeze server. After calling passenger-install-apache2-module as root i get the following error message:
Compiling and installing Apache 2 module...
cd /usr/lib/ruby/gems/1.8/gems/passenger-3.0.19
/usr/bin/ruby1.8 /usr/bin/rake apache2:clean apache2 RELEASE=yes
# /usr/bin/ruby1.8 /usr/bin/rake apache2:clean apache2 RELEASE=yes
rake aborted!
no such file to load -- rubygems/builder
Where is the problem? How can i fix this? Using passenger-install-apache2-module --trace doesn't work (for full stacktrace).
I used the newest passenger version (actually 4.0.0.rc4) from git repository and created a gem. Using this gem worked fine.
git clone https://github.com/FooBarWidget/passenger.git
cd passenger
gem build passenger.gemspec
gem install passenger-*.gem
After that you can build the apache2 plugin using passenger-install-apache2-module.
I had a similar environment (passenger 3.0.9, Ruby 1.8.7) and i solved the problem by downgrading rubygems.
The latest stable RVM will install rubygems v(2+). I downgraded to rubygems v(1.6.2), reinstalled the passenger gem and the problem went away.
in an RVM environment the command is gem update --system 1.6.2
The 1.8.x version of rubygems also works, but it throws too many deprecation warnings on everything you do.
I answered a similar question a few minutes ago, here: Passenger: cannot load such file rubygems/builder
Essentially is an issue with Ruby 2.0. I offer a possible solutions there (extracted from a github comment).
If you're not using Ruby 2.0 then perhaps you need to do: gem install builder
If you are running Ruby 2
Edit the file config/rubber/rubber-passenger.yml and
Change the line
passenger_version: 3.0.19
To
passenger_version: 4.0.35 # works fine with 4.0.35 but you can try a newer version
Remember to check the Ruby version in
config/rubber/rubber-ruby.yml
ruby_version: 2.0.0-p247
Make sure you got zlibc.
sudo apt-get install zlibc zlib1g zlib1g-dev
then reinstall or recompile ruby.
Had exactly the same problem. On Amazon Linux, following worked fine:
gem install passenger && passenger-install-apache2-module
Running 'gem install passenger' added the latest version to the system. Removed the old one too:
#gem list passenger
*** LOCAL GEMS ***
passenger (4.0.10, 3.0.19)
#gem uninstall passenger
Select gem to uninstall:
1. passenger-3.0.19
2. passenger-4.0.10
3. All versions
> 1
Successfully uninstalled passenger-3.0.19
I had the same issue. To resolve this I had to downgrade rubygems package. My configuration was passenger 3.0.2 and rubygems 1.3.7.
I'm trying to install rspec version 1.3.2 on OS X Lion using RVM and Ruby 1.8.6
When I install, I get the following:
$ gem install rspec -v=1.3.2
Abort trap: 6
I'm able to successfully install the same rspec version using the system ruby. I've tried to do some research into the problem, but it doesn't look like anybody has run into the same thing. Similar questions have suggested export CC=gcc-4.2 before installing ruby. I tried that (after completely blowing away RVM and reinstalling the latest version, 1.6.31 right now) but it had no effect.
Has anyone else else encountered this? Have you found a solution?
I installed 1.8.6 fresh with no gems and installed with verbose flag...
gem install rspec -v=1.3.2 --verbose
GET http://rubygems.org/specs.4.8.gz
302 Moved Temporarily
GET http://production.s3.rubygems.org/specs.4.8.gz
200 OK
Installing gem rspec-1.3.2
Abort trap: 6
I see the problem of Abort Trap 6 seems to indicate that some dependency is missing. I was hoping that this would get resolved with the pristine command, but settled on just going down a version.
rvm gemset pristine
gem install rspec -v=1.3.1 --verbose
...
Successfully installed rspec-1.3.1
...
gem list
*** LOCAL GEMS ***
rake (0.9.2)
rspec (1.3.1)
Why must you use 1.3.2 instead of 1.3.1? Hope this helps.
I am trying to install sproutcore on a windows xp vm (virtualbox), for development, using RubyGems. When gems reaches haml-3.0.25.gem it stops with the error:
gem install sproutcore -V
...
ERROR: While executing gem ... (Zlib::DataError)
invalid stored block lengths
I have tried both Ruby 1.8.7 and 1.9.2 as well as RubyGems 1.7.1 and 1.8.1.
I tried downloading haml 3.1.1 with git and installing it manually, but the rake would not install. It said something about 'lib/haml' not found. The directory did exist.
Other gems install just fine under all the combinations I tried. I even tried installing it under my host OS (Win 7 32-bit), but it gave the same error. Installing haml by itself changes the error message only slightly:
gem install haml -V
...
ERROR: While executing gem ... (Zlib::DataError)
invalid code lengths set
Zlib compresses and decompresses data streams from what I have read, so it sounds like the haml gem might be corrupt (although I doubt).
I am at my wits end and could find no helpful advice anywhere.
Special thanks to #saner for his contribution. After a lot of frustration, this is how I finally installed sproutcore on a Windows XP VM running on a Windows 7 host.
1) Download and install Ruby 1.9.2-p180 (remember to tick the option to include the bin directory in the PATH variable).
2) Download DevKit 4.5.1 and extract it.
3) Open a command prompt and cd to the extracted directory.
4) Run:
ruby dk.rb init
ruby dk.rb review
ruby dk.rb install
5) Download RubyGems 1.7.2 and run setup.rb
6) From the command prompt run
gem install haml -v 3.0.24
gem install eventmachine --pre
gem install sproutcore --pre
Thats it.
Enjoy.
I was able to install SproutCore on Ruby 1.9.2:
Install Ruby 1.9.2-p180
gem install sproutcore --pre
gem install eventmachine --pre
gem uninstall thin
gem install mongrel
I needed to remove thin because starting sc-server ended with errors, SproutCore will use mongrel instead of thin.
Update:
I didn't mention that I use RubyGems 1.7.2 and I have installed DevKit and Cygwin.
I removed all versions of SproutCore, Mongrel and Haml, then I typed:
gem install sproutcore --pre, SproutCore v1.6.0.beta.1 was installed.
eventmachine --pre, eventmachine (1.0.0.beta.3 x86-mingw32) was installed
SproutCore works with this setup, using mongrel was not necessary.
My configuration: sproutcore (1.6.0.beta.1), ruby 1.9.2p180, gem 1.7.2, thin (1.2.11 x86-mingw32), eventmachine (1.0.0.beta.3 x86-mingw32), haml (3.0.25), gcc version 4.5.0 (GCC)
I know this is a really old question, but since I just experienced the same problem, I've decided to add my insights on it.
So, it happened while I was trying to install the same set of gems on two different machines with different architectures, with different locations and respectively in different networks. I.e. - my home mac and a remote linux server.
So, one particular gem (dm-sqlite-adapter) failed installing on both machines, and I even tried it couple of times, but always with the same result:
$ gem install dm-sqlite-adapter
ERROR: While executing gem ... (Zlib::DataError)
invalid code lengths set
Then I spent few minutes browsing the network for a solution, including reading this thread.
Since I didn't find any satisfying answer and I wasn't pleased with the idea of reinstalling everything, decided to act dumb and tried gem install one more time.. And it worked. Then tried the other machine - worked like a charm.
So as a conclusion I'd just guess that the problem came from the remote repo and maybe the gem hadn't even downloaded at all (I forgot to check that prior to succeeding installing it). But as I said - it's just a guess..