error Installing linecache19 gem bundler rvm - ruby

I'm failing to install linecache19 gem via bundler with an rvm installation of ruby 1.9.2 on aptosid (ie debian sid).
I am new to ruby but my ruby installation is clearly not completely mis-configured as I have been able to install rails and a bunch of gems.
The output I get is the following:
Installing linecache19 (0.5.12) with native extensions
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
/home/caz/.rvm/rubies/ruby-1.9.2-p320/bin/ruby extconf.rb
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers. Check the mkmf.log file for more
details. You may need configuration options.
Provided configuration options:
/home/caz/.rvm/rubies/ruby-1.9.2-p320/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require': no such file to load -- openssl (LoadError)
ms/custom_require.rb:36:in `require'
in `<top (required)>'
ms/custom_require.rb:36:in `require'
from /home/caz/.rvm/rubies/ruby-1.9.2-p320/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from /home/caz/.rvm/gems/ruby-1.9.2-p320/gems/ruby_core_source-0.1.5/lib/contrib/uri_ext.rb:11:in `<top (required)>'
from /home/caz/.rvm/rubies/ruby-1.9.2-p320/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from /home/caz/.rvm/rubies/ruby-1.9.2-p320/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from /home/caz/.rvm/gems/ruby-1.9.2-p320/gems/ruby_core_source-0.1.5/lib/ruby_core_source.rb:6:in `<top (required)>'
from <internal:lib/rubygems/custom_require>:33:in `require'
from <internal:lib/rubygems/custom_require>:33:in `rescue in require'
from <internal:lib/rubygems/custom_require>:29:in `require'
from extconf.rb:2:in `<main>'
Gem files will remain installed in /home/caz/.rvm/gems/ruby-1.9.2-p320/gems/linecache19-0.5.12 for inspection.
Results logged to /home/caz/.rvm/gems/ruby-1.9.2-p320/gems/linecache19-0.5.12/ext/trace_nums/gem_make.out
An error occured while installing linecache19 (0.5.12), and Bundler cannot continue.
Make sure that `gem install linecache19 -v '0.5.12'` succeeds before bundling.
I have tried the solution which is usually suggested:
gem install ruby-debug19 -- --with-ruby-include=$rvm_path/src/ruby-1.9.2-p320
I have also tried using the --force option without success as per the following:
Installing Gems without rvm, as root, with explicit version of ruby
I'm confused by the presence of "1.9.1" in the path reported in the output- I wonder whether this is a hangover of the debian ruby package and the source of my problems.
ps this is all in aid of installing the Smallest Federated Wiki. I encourage readers to take a look at this project.

in your terminal enter rvm requirements
It will provide you with something like
Additional Dependencies:
# For Ruby / Ruby HEAD (MRI, Rubinius, & REE), install the following:
ruby: /usr/bin/apt-get install build-essential openssl libreadline6 libreadline6-dev curl git-core zlib1g zlib1g-dev libssl-dev libyaml-dev libsqlite3-0 libsqlite3-dev sqlite3 libxml2-dev libxslt-dev autoconf libc6-dev ncurses-dev automake libtool bison subversion
go ahead and copy the command and run it. It will install all dependencies required for running ruby.

Related

Installing Ruby using rbenv on Deepin 15.10

Trying to install Ruby using rbenv (or any other installer I tried RVM and ruby-install) fails and gives this error
$ rbenv install 2.6.3
> Downloading ruby-2.6.3.tar.bz2...
-> https://cache.ruby-lang.org/pub/ruby/2.6/ruby-2.6.3.tar.bz2
Installing ruby-2.6.3...
ruby-build: use readline from homebrew
BUILD FAILED (Deepin 15.10 using ruby-build 20190423)
Inspect or clean up the working tree at /tmp/ruby-build.20190507002901.29361
Results logged to /tmp/ruby-build.20190507002901.29361.log
Last 10 log lines:
from /tmp/ruby-build.20190507002901.29361/ruby-2.6.3/lib/rubygems/package.rb:44:in `<top (required)>'
from /tmp/ruby-build.20190507002901.29361/ruby-2.6.3/lib/rubygems/core_ext/kernel_require.rb:54:in `require'
from /tmp/ruby-build.20190507002901.29361/ruby-2.6.3/lib/rubygems/core_ext/kernel_require.rb:54:in `require'
from /tmp/ruby-build.20190507002901.29361/ruby-2.6.3/lib/rubygems/installer.rb:11:in `<top (required)>'
from /tmp/ruby-build.20190507002901.29361/ruby-2.6.3/lib/rubygems/core_ext/kernel_require.rb:54:in `require'
from /tmp/ruby-build.20190507002901.29361/ruby-2.6.3/lib/rubygems/core_ext/kernel_require.rb:54:in `require'
from ./tool/rbinstall.rb:703:in `<module:RbInstall>'
from ./tool/rbinstall.rb:639:in `<main>'
uncommon.mk:364: recipe for target 'do-install-all' failed
make: *** [do-install-all] Error 1
FINALLY FIXED IT !!
I had to use brew unlink openssl
then sudo apt-get install -y libssl-dev zlib1g-dev
then i tried rbenv install 2.6.3 and IT WORKED !
Try this:
$ TMPDIR=~/tmp/ rbenv install 2.6.3

"invalid gem" with different versions of ruby and its packages

I know very little about ruby and its package management. On a Ubuntu 16.04 system, there seems to be something messed up with different versions of ruby. I tried to run pdfbeads ruby program.
$ pdfbeads -o all.pdf
/home/t/.rvm/rubies/ruby-1.9.3-p551/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:54:in `require': iconv will be deprecated in the future, use String#encode instead.
/home/t/.rvm/rubies/ruby-1.9.3-p551/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:128:in `require': libMagickCore.so.5: cannot open shared object file: No such file or directory - /home/t/.rvm/gems/ruby-1.9.3-p551/extensions/x86_64-linux/1.9.1/rmagick-2.13.4/RMagick2.so (LoadError)
from /home/t/.rvm/rubies/ruby-1.9.3-p551/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:128:in `rescue in require'
from /home/t/.rvm/rubies/ruby-1.9.3-p551/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:39:in `require'
from /home/t/.rvm/gems/ruby-1.9.3-p551/gems/rmagick-2.13.4/lib/rmagick_internal.rb:11:in `<top (required)>'
from /home/t/.rvm/rubies/ruby-1.9.3-p551/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:54:in `require'
from /home/t/.rvm/rubies/ruby-1.9.3-p551/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:54:in `require'
from /home/t/.rvm/gems/ruby-1.9.3-p551/gems/rmagick-2.13.4/lib/RMagick.rb:1:in `<top (required)>'
from /home/t/.rvm/rubies/ruby-1.9.3-p551/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:54:in `require'
from /home/t/.rvm/rubies/ruby-1.9.3-p551/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:54:in `require'
from /home/t/.rvm/gems/ruby-1.9.3-p551/gems/pdfbeads-1.1.1/lib/pdfbeads.rb:35:in `<top (required)>'
from /home/t/.rvm/rubies/ruby-1.9.3-p551/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:54:in `require'
from /home/t/.rvm/rubies/ruby-1.9.3-p551/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:54:in `require'
from /home/t/.rvm/gems/ruby-1.9.3-p551/gems/pdfbeads-1.1.1/bin/pdfbeads:38:in `<top (required)>'
from /home/t/.rvm/gems/ruby-1.9.3-p551/bin/pdfbeads:23:in `load'
from /home/t/.rvm/gems/ruby-1.9.3-p551/bin/pdfbeads:23:in `<main>'
from /home/t/.rvm/gems/ruby-1.9.3-p551/bin/ruby_executable_hooks:15:in `eval'
from /home/t/.rvm/gems/ruby-1.9.3-p551/bin/ruby_executable_hooks:15:in `<main>'
I first found that the default pdfbeads isn't the one for the latest version of ruby, so I call the latter directly:
$ which pdfbeads
/home/t/.rvm/gems/ruby-1.9.3-p551/bin/pdfbeads
$ whereis pdfbeads
pdfbeads: /usr/local/bin/pdfbeads /home/t/.rvm/gems/ruby-1.9.3-p551/bin/pdfbeads
$ whereis gem
gem: /usr/bin/gem2.3 /usr/bin/gem /home/t/.rvm/rubies/ruby-1.9.3-p551/bin/gem /usr/share/man/man1/gem.1.gz
$ gem --version
2.4.3
$ /usr/local/bin/pdfbeads -o all.pdf
Ignoring executable-hooks-1.3.2 because its extensions are not built. Try: gem pristine executable-hooks --version 1.3.2
Ignoring gem-wrappers-1.2.7 because its extensions are not built. Try: gem pristine gem-wrappers --version 1.2.7
Ignoring nokogiri-1.6.6.2 because its extensions are not built. Try: gem pristine nokogiri --version 1.6.6.2
Ignoring rmagick-2.13.4 because its extensions are not built. Try: gem pristine rmagick --version 2.13.4
/usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require': cannot load such file -- iconv (LoadError)
from /usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /home/t/.rvm/gems/ruby-1.9.3-p551/gems/pdfbeads-1.1.1/bin/pdfbeads:35:in `<top (required)>'
from /usr/local/bin/pdfbeads:23:in `load'
from /usr/local/bin/pdfbeads:23:in `<main>'
Hoping to solve the problem, I run the suggested gem command, but what does the error mean here?
$ gem pristine executable-hooks --version 1.3.2
Restoring gems to pristine condition...
Cached gem for executable-hooks-1.3.2 not found, attempting to fetch...
Fetching: executable-hooks-1.3.2.gem (100%)
ERROR: While executing gem ... (Gem::InstallError)
invalid gem: No such file or directory - /home/t/.rvm/gems/ruby-1.9.3-p551#global/cache/executable-hooks-1.3.2.gem
How can I clean up the old version of ruby and its packages, if I only need the newer version?
Thanks.
You are missing some libraries (imagemagick). Please try installing them:
sudo apt-get install imagemagick libmagickwand-dev
After that try again to install your gem.
To cleanup old version of a gem run:
gem cleanup pdfbeads
To uninstall a specific ruby version run:
rvm remove 1.9.3
You can also take a look in the folder /home/t/.rvm/ and clean up by hand. But do that with care. Or just take a look in this folder to find out which ruby versions and gemsets are installed and clean up with the rvm commands.

ta-lib gem not installing dependencies?

I am trying to run a simple example script from here, but even after installing requisite gems with no errors I get an error when running the script. It looks like libta_lib.so cant be found, but nothing in the install commands below had an error. Any idea what I am missing? Im happy to provide more data if needed, I just dont know what would be useful.
I ran:
#compiling ta-lib from source
gem uninstall talib_ruby
gem uninstall ta-indicator
make clean
sudo ./configure LDFLAGS="-lm"
sudo make
sudo make install
gem install talib_ruby
gem install ta-indicator
king#death-star ~/Desktop/_REPOS/misc/stock_analysis/forex/oanda/ruby $ ruby -e "require 'talib_ruby'; l = TaLib::Function.new('MA') "
/home/king/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require': libta_lib.so.0: cannot open shared object file: No such file or directory - /home/king/.rvm/gems/ruby-2.3.0/gems/talib_ruby-1.0.6/lib/talib.so (LoadError)
from /home/king/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /home/king/.rvm/gems/ruby-2.3.0/gems/talib_ruby-1.0.6/lib/talib_ruby.rb:5:in `<top (required)>'
from /home/king/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:127:in `require'
from /home/king/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:127:in `rescue in require'
from /home/king/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:40:in `require'
from -e:1:in `<main>'
As per this follow these steps
sudo gedit /etc/ld.so.conf
Append below line and save:
include /usr/local/lib
run sudo /sbin/ldconfig

Troubles with ruby-2.X installation using RVM

I recently came across of the ruby-2.0.0-p0 installation. After the successfully installation of the rvm i type the following command at the bash.
rvm install ruby-2.0.0-p0
This this the result log.
Searching for binary rubies, this might take some time.
No binary rubies available for: debian/wheezy_sid/i386/ruby-2.0.0-p0.
Continuing with compilation. Please read 'rvm mount' to get more information on binary rubies.
Installing Ruby from source to: /home/javier/.rvm/rubies/ruby-2.0.0-p0, this may take a while depending on your cpu(s)...
ruby-2.0.0-p0 - #downloading ruby-2.0.0-p0, this may take a while depending on your connection...
ruby-2.0.0-p0 - #extracting ruby-2.0.0-p0 to /home/javier/.rvm/src/ruby-2.0.0-p0
ruby-2.0.0-p0 - #extracted to /home/javier/.rvm/src/ruby-2.0.0-p0
ruby-2.0.0-p0 - #configuring
ruby-2.0.0-p0 - #compiling
ruby-2.0.0-p0 - #installing
Removing old Rubygems files...
Installing rubygems-2.0.0 for ruby-2.0.0-p0 ...
Error running 'env GEM_PATH=/home/javier/.rvm/gems/ruby-2.0.0-p0:/home/javier/.rvm/gems/ruby-2.0.0-p0#global:/home/javier/.rvm/gems/ruby-2.0.0-p0:/home/javier/.rvm/gems/ruby-2.0.0-p0#global GEM_HOME=/home/javier/.rvm/gems/ruby-2.0.0-p0 /home/javier/.rvm/rubies/ruby-2.0.0-p0/bin/ruby /home/javier/.rvm/src/rubygems-2.0.0/setup.rb', please read /home/javier/.rvm/log/ruby-2.0.0-p0/rubygems.install.log
Installation of rubygems did not complete successfully.
Saving wrappers to '/home/javier/.rvm/bin'.
ruby-2.0.0-p0 - #adjusting #shebangs for (gem irb erb ri rdoc testrb rake).
ruby-2.0.0-p0 - #importing default gemsets, this may take time ...
Install of ruby-2.0.0-p0 - #complete
Making gemset ruby-2.0.0-p0 pristine.
Error running '' under ,
please read /home/javier/.rvm/log/ruby-2.0.0-p0/gemset.pristine.log
Making gemset ruby-2.0.0-p0#global pristine.
Error running '' under ,
please read /home/javier/.rvm/log/ruby-2.0.0-p0/gemset.pristine.log
Note that the process goes without troubles until the installation of ruby gems.
What's going on here ??
Any help appreciated.
First comment output
cat /home/javier/.rvm/log/ruby-2.0.0-p0/rubygems.install.log
/home/javier/.rvm/src/rubygems-2.0.0/lib/rubygems/core_ext/kernel_require.rb:45:in `require': cannot load such file -- openssl (LoadError)
from /home/javier/.rvm/src/rubygems-2.0.0/lib/rubygems/core_ext/kernel_require.rb:45:in `require'
from /home/javier/.rvm/src/rubygems-2.0.0/lib/rubygems/security.rb:8:in `<top (required)>'
from /home/javier/.rvm/src/rubygems-2.0.0/lib/rubygems/core_ext/kernel_require.rb:45:in `require'
from /home/javier/.rvm/src/rubygems-2.0.0/lib/rubygems/core_ext/kernel_require.rb:45:in `require'
from /home/javier/.rvm/src/rubygems-2.0.0/lib/rubygems/package.rb:43:in `<top (required)>'
from /home/javier/.rvm/src/rubygems-2.0.0/lib/rubygems/core_ext/kernel_require.rb:45:in `require'
from /home/javier/.rvm/src/rubygems-2.0.0/lib/rubygems/core_ext/kernel_require.rb:45:in `require'
from /home/javier/.rvm/src/rubygems-2.0.0/lib/rubygems/installer.rb:8:in `<top (required)>'
from /home/javier/.rvm/src/rubygems-2.0.0/lib/rubygems/core_ext/kernel_require.rb:45:in `require'
from /home/javier/.rvm/src/rubygems-2.0.0/lib/rubygems/core_ext/kernel_require.rb:45:in `require'
from /home/javier/.rvm/src/rubygems-2.0.0/lib/rubygems/request_set.rb:5:in `<top (required)>'
from /home/javier/.rvm/src/rubygems-2.0.0/lib/rubygems.rb:195:in `finish_resolve'
from /home/javier/.rvm/src/rubygems-2.0.0/lib/rubygems/rdoc.rb:14:in `<top (required)>'
from /home/javier/.rvm/src/rubygems-2.0.0/lib/rubygems/core_ext/kernel_require.rb:45:in `require'
from /home/javier/.rvm/src/rubygems-2.0.0/lib/rubygems/core_ext/kernel_require.rb:45:in `require'
from /home/javier/.rvm/src/rubygems-2.0.0/lib/rubygems/uninstaller.rb:10:in `<top (required)>'
from /home/javier/.rvm/src/rubygems-2.0.0/lib/rubygems/core_ext/kernel_require.rb:45:in `require'
from /home/javier/.rvm/src/rubygems-2.0.0/lib/rubygems/core_ext/kernel_require.rb:45:in `require'
from /home/javier/.rvm/src/rubygems-2.0.0/lib/rubygems/commands/setup_command.rb:440:in `uninstall_old_gemcutter'
from /home/javier/.rvm/src/rubygems-2.0.0/lib/rubygems/commands/setup_command.rb:144:in `execute'
from /home/javier/.rvm/src/rubygems-2.0.0/lib/rubygems/command.rb:305:in `invoke_with_build_args'
from /home/javier/.rvm/src/rubygems-2.0.0/lib/rubygems/command_manager.rb:170:in `process_args'
from /home/javier/.rvm/src/rubygems-2.0.0/lib/rubygems/command_manager.rb:130:in `run'
from /home/javier/.rvm/src/rubygems-2.0.0/lib/rubygems/gem_runner.rb:60:in `run'
from setup.rb:45:in `<main>'
RubyGems 2.0.0 installed
Second comment output And the other command
rvm use --default 2.0.0
RVM is not a function, selecting rubies with 'rvm use ...' will not work.
You need to change your terminal emulator preferences to allow login shell.
Sometimes it is required to use `/bin/bash --login` as the command.
Please visit https://rvm.io/integration/gnome-terminal/ for a example.
Try the following
$ rvm remove 2.0.0 # get rid of unsuccessful installation
$ rvm get head --autolibs=3 # get the latest RVM and build required libs
$ rvm requirements # just in case, install all other required stuff
$ rvm install ruby-2.0.0
If at any of those commands fails at any point. Update your question with the logs.
I had this exact same problem. The solution was elegant and simple.
Just update your gems direct from the command line:
sudo gem update --system
That's it!
Terminal will now show:
Updating RubyGems
Updating rubygems-update
Successfully installed rubygems-update-2.0.3
Updating RubyGems to 2.0.3
Installing RubyGems 2.0.3
RubyGems 2.0.3 installed
I had this exact same problem, same error message, etc. I don't know about you, but I use MacPorts, and through that I have libraries like OpenSSL installed, which I think may have contributed to my trouble.
I just got it working on my system; I'm not sure exactly what I did right but here are the steps I took:
Set up my ~/.rvmrc to match the first code block here.
Uninstalled 2.0.0 through rvm (rvm remove 2.0.0).
Removed the folders for ruby-2.0.0, rubygems-2.0.0 and the dependency packages like OpenSSL and YAML in ~/.rvm/src.
Executed rvm install 2.0.0 --with-opt-dir=/opt/local --autolibs=0. /opt/local is my MacPorts prefix directory, and autolibs=0 disables any dependency installation so it didn't have the opportunity to use something other than my MacPorts libraries. If you get through this step without red console output you're past the errors you were having above.
Not knowing if having an empty default gemset was the problem I also ran rvm use --create 2.0.0#... to get a non-default gemset created and then (successfully) installed a gem and its dependencies into it.
I hope this helps!
Open Up the Terminal and then Go to Edit > Profile Preferences and then go to the Tab "Title and Command" and Check "Run Command as Login Shell".
Boot Up a Bash and Now you can install Gems directly from the terminal without the use of sudo and the error "RVM is not a function, selecting rubies with 'rvm use ...' will not work." will be eliminated.
Cheers.

Heroku gem not working with RVM

I'm following the Ruby on Rails tutorial at http://railstutorial.org/chapters/beginning#sec:1.4.1, and all is going well until I tried to get my app going on Heroku.
I installed heroku, that worked fine, but now when I run heroku keys:add or any other heroku command, I get the following error:
/home/sirswap/.rvm/gems/ruby-1.9.2-p0#rails3tutorial/gems/rest-client-1.4.2/lib/restclient.rb:9:in `rescue in <top (required)>':
no such file to load -- net/https. Try running apt-get install libopenssl-ruby (LoadError)
from /home/sirswap/.rvm/gems/ruby-1.9.2-p0#rails3tutorial/gems/rest-client-1.4.2/lib/restclient.rb:5:in `<top (required)>'
from <internal:lib/rubygems/custom_require>:29:in `require'
from <internal:lib/rubygems/custom_require>:29:in `require'
from /home/sirswap/.rvm/gems/ruby-1.9.2-p0#rails3tutorial/gems/rest-client-1.4.2/lib/rest_client.rb:2:in `<top (required)>'
from <internal:lib/rubygems/custom_require>:29:in `require'
from <internal:lib/rubygems/custom_require>:29:in `require'
from /home/sirswap/.rvm/gems/ruby-1.9.2-p0#rails3tutorial/gems/heroku-1.9.14/lib/heroku/client.rb:2:in `<top (required)>'
from <internal:lib/rubygems/custom_require>:29:in `require'
from <internal:lib/rubygems/custom_require>:29:in `require'
from /home/sirswap/.rvm/gems/ruby-1.9.2-p0#rails3tutorial/gems/heroku-1.9.14/lib/heroku.rb:3:in `<top (required)>'
from <internal:lib/rubygems/custom_require>:29:in `require'
from <internal:lib/rubygems/custom_require>:29:in `require'
from /home/sirswap/.rvm/gems/ruby-1.9.2-p0#rails3tutorial/gems/heroku-1.9.14/bin/heroku:6:in `<top (required)>'
from /home/sirswap/.rvm/gems/ruby-1.9.2-p0#rails3tutorial/bin/heroku:19:in `load'
from /home/sirswap/.rvm/gems/ruby-1.9.2-p0#rails3tutorial/bin/heroku:19:in `<main>'
I did what the error message said, and installed libopenssl-ruby, but heroku still didn't work.
I've done a search and found the following two pages which try to combat the heroku errors:
http://www.mail-archive.com/heroku#googlegroups.com/msg05001.html
http://blog.project-sierra.de/archives/1534
I followed the instructions on these pages (which are the same), but heroku still doesn't work.
I usually do my work on windows, so everything is a bit new to me on ubuntu. Here's my ruby environment:
RubyGems Environment:
- RUBYGEMS VERSION: 1.3.7
- RUBY VERSION: 1.9.2 (2010-08-18 patchlevel 0) [i686-linux]
- INSTALLATION DIRECTORY: /home/sirswap/.rvm/gems/ruby-1.9.2-p0#rails3tutorial
- RUBY EXECUTABLE: /home/sirswap/.rvm/rubies/ruby-1.9.2-p0/bin/ruby
- EXECUTABLE DIRECTORY: /home/sirswap/.rvm/gems/ruby-1.9.2-p0#rails3tutorial/bin
- RUBYGEMS PLATFORMS:
- ruby
- x86-linux
- GEM PATHS:
- /home/sirswap/.rvm/gems/ruby-1.9.2-p0#rails3tutorial
- /home/sirswap/.rvm/gems/ruby-1.9.2-p0#global
- GEM CONFIGURATION:
- :update_sources => true
- :verbose => true
- :benchmark => false
- :backtrace => false
- :bulk_threshold => 1000
- REMOTE SOURCES:
- http://rubygems.org/
I'm running ubuntu 10.04.
Any help or advice for next steps would be much appreciated :)
I experienced the same problem, and I think it was caused by not installing all the ruby dependencies listed when you run:
$rvm requirements # it was earlier: rvm notes
Specifically, I executed [be sure to install aptitude first]:
$sudo aptitude install build-essential bison openssl libreadline5 libreadline5-dev curl git zlib1g zlib1g-dev libssl-dev libsqlite3-0 libsqlite3-dev sqlite3 libxml2-dev
and after all that, I recompiled my ruby install (using $rvm reinstall 1.9.2) and heroku worked like a charm.
Hey :)
Don't know if it's still relevant or whether this will work for you as well.. it did for me.
Had the exact same problem..
I also noticed when doing
$ rails console
I was getting errors which indicated I had problems with Readline.
Following http://rvm.beginrescueend.com/packages/readline/ helped me fix all issues I was experiencing.
I blew many hours on this yesterday. Eventually, somewhat by chance (actually more like sheer desperation), I looked in the file /usr/bin/heroku
I noticed the first line of the script said
#!/usr/bin/env ruby1.9.1
I changed this to
#!/usr/bin/env ruby
and it started working. After re-installing ruby about 10 times and all that mucking around with openssl. rolleyes
I'm also doing the Railstutorial on Ubuntu 10.10 and got the exact same error while trying to add Heroku keys. This solves it:
$ rvm remove 1.9.2
$ rvm pkg install openssl
$ rvm install 1.9.2 -C --with-openssl-dir=$HOME/.rvm/usr
Read my directions on how to install RVM on Linux. You need to install libssl-dev or things like net/https won't work. It's OK though, just install that and recompile your rubies.
In your case "recompiling your rubies" can probably be done by issuing:
rvm install
Or alternatively you might make some progress by manually recompiling the openssl extension:
cd /home/sirswap/.rvm/src/ruby-1.9.2-p0/ext/openssl
ruby extconf.rb
make
make install
Please reinstall ruby. I was same problem and fixed by reinstalling ruby.
rvm reinstall ruby 1.9.2

Resources