Attempting to install termios gem results in make errors - ruby

I'm attempting to install the termios gem on OS X 10.7 with ruby 1.9.3-p194. It used to install fine, but now, even when i try to install it in 1.9.3-p125, i get the same errors:
https://gist.github.com/83a4ff80fa882dcd6937
Any help would be greatly appreciated.

Use gem install ruby-termios
http://rubygems.org/gems/ruby-termios

Related

Installing into parent path not allowed when installing locally built Ruby gem

I've written a Ruby gem that I'd like to install locally. I'm using Rubygems 3.0.6 and RVM on OS X Mojave. This is a closed source gem and I'd rather not go to the trouble of publishing it to the company gemservers. I'm able to install other (published) gems just fine using both bundle install and gem install.
The gem is all built (using gem build) and the code works, but when I run:
gem install influx_trello_utility-0.1.0.gem
I get an error:
ERROR: While executing gem ... (Gem::Package::PathError)
installing into parent path /bin/[ of /Users/danascheider/.rvm/gems/ruby-2.6.3#influx_trello_utility/gems/influx_trello_utility-0.1.0 is not allowed
Any help with this would be much appreciated. I'm not sure what additional information would be useful, but I'm happy to answer any questions you may have. Thanks!

Installing Metasploit Framework on OS X Yosemite, metasploit-framework -v '4.10.1.pre.dev' not found

I am trying to install Metasploit Framework on OS X Yosemite and whilst running bundle install the installer gets stuck on trying to install metasploit-framework -v '4.10.1.pre.dev'.
When I run gem install metasploit-framework -v '4.10.1.pre.dev' on it's own I get this error:
ERROR: Could not find a valid gem 'metasploit-framework' (= 4.10.1.pre.dev) in any repository
ERROR: Possible alternatives: test_framework, metasploit-yard, metasploit-runner, metasploit-erd,
metasploit-concern
Has anyone successfully installed msf on Yosemite that could help me out?
It seems like Gem needs more access, so if you are using RVM then Try this:
rvmsudo bundle install
Solved by going to the github page for the framework and cloning it into my /opt directory. After I just ran msfupdate everything installed as normal!

Ruby on mac not installing gem showing permission denied

I am trying to install a ruby gem in My Machine using xcode where I call a shell script.
cd "/Users/Desktop/gemfolder"
gem install somegem.gem
I am getting an error like this:
While executing gem ... (Errno::EACCES)
Permission denied - /Library/Ruby/Gems/1.8
Any workaround for it I am a newbie to ruby so don't know what to do anyhelp will highly appreciated.
Being sudo might fix your problem, however when you are installing gems , its not a good idea to install them as sudo, so the preferred way of installing ruby on any machine is to install rvm (Ruby Version Manager) first and then install your ruby version.
Main advantages of having a ruby version manager are,
1 - allows you to install multiple ruby versions side by side
2 - allows you to install gems for each ruby version (via gemsets)
So to install rvm in your mac, check here
list of ruby version managers

gem install capistrano failure

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

Automate a Ruby Gem install that has input

I am trying to install the ibm_db gem so that I can access DB2 from Ruby. When I try:
sudo gem install ibm_db
I get the following request for clarification:
Select which gem to install for your platform (i486-linux)
1. ibm_db 0.10.0 (ruby)
2. ibm_db 0.10.0 (mswin32)
3. ibm_db 0.9.5 (mswin32)
4. ibm_db 0.9.5 (ruby)
5. Skip this gem
6. Cancel installation
I am always going to be installing the linux version (which I assume is the "ruby" version), so is there a way to pick which one I will install straight from the gem install command?
The reason this is a problem is that I need to automate this install via a bash script, so I would like to select that I want the "ruby" version ahead of time.
You can use a 'here document'. That is:
sudo gem install ibm_db <<heredoc
1
heredoc
What's between the \<\<\SOMETHING and SOMETHING gets inputted as entry to the previous command (somewhat like ruby's own heredocuments). The 1 there alone, of course, is the selection of the "ibm_db 0.10.0 (ruby)" platform.
Hope it's enough.
Try this:
sudo gem install --platform ruby ibm_db
Note that you can get help on the install command using:
gem help install
UPDATE: Looks like this option only works for RubyGems 0.9.5 or above.
Try this, I think it only works on Bash though
sudo gem install ibm_db < <(echo 1)
#John Topley
I already tried gem help install, and --platform is not an option, both in help and in practice:
$ sudo gem install ibm_db --platform ruby
ERROR: While executing gem ... (OptionParser::InvalidOption)
invalid option: --platform
UPDATE: The Ubuntu repos have 0.9.4 version of rubygems, which doesn't have the --platform option. It appears it may be a new feature in 0.9.5, but there is still no online documentation for it, and regardless, it won't work on Ubuntu which is the platform I need it to work on.
Versions of Rubygems from 1.0 and up automatically detect the platform you are running and thus do not ask that question. Are you able to update your gems to the latest?
$ sudo gem update --system
Be warned if you are on Windows once you have updated; you might run into this issue.
Another option is to download the .gem file and install it manually as such:
sudo gem install path/to/ibm_db-0.10.0.gem
This particular gem was at rubyforge.

Resources