What replacements are available for pinging an ip address in Ruby? The stdlib "ping" library seems to be pretty limited in functionality. I'm not interested in rolling my own code here. Are there good gems available? Should I just suck it up and live with it?
(I'm coding in Ruby 1.8.6 on Linux)
...
Backstory
I'm on Rails 2.1 and need to freeze the Capistrano gem to my vendor folder (as my host has broken their cap gem dependencies and I want to make myself as independent as possible).
On my local windows machine I've put the following my environment.rb
config.gem "capistrano", :version => "2.5.2"
config.gem "net-ssh", :lib => "n...
By default, when you sudo gem install thegemname it will install executables into /usr/bin/
Is there a way to change this? For example, to install them into /usr/local/rubygems/bin (or any other path)?
The path doesn't seem to be hard-coded into the gemspec file, so I don't see why this shouldn't be possible (although I have very littl...
Following on from my question on using frozen Capistrano a couple of days back I'm still having issues running Capistrano frozen in my vendor folder.
When I try and run my frozen version of cap
ruby -r rubygems ./vendor/gems/capistrano-2.5.2/bin/cap deploy-with-migrations
I get an error
... RubyGem version error: net-ssh(1.0.8 not ...
Linux 2.6.18-92.el5, ruby 1.8.7, Rails 2.2.2, mysql gem 2.7
I installed the MySQL binary distribution under /usr/local, then installed the mysql gem like this:
gem install mysql --no-rdoc --no-ri \
-- --with-mysql-include=/usr/local/mysql/include \
--with-mysql-lib=/usr/local/mysql/lib \
--with-mysql-config=/usr/local/mysql/bin/m...
Suppose you have a software package. You want to make it a gem, because gems are the de facto standard way to distribute anything in the Ruby world. Gems are great -- for libraries. But for real applications, the Rubygems system seems lacking. Only "recently" did they introduce a way to mark executables to be placed in somewhere in t...
I'm trying to setup a second ruby install in my home directory (a different version of ruby for testing). I've compiled ruby into ~/bin/ and everything is working until I try to install rubygems.
I have GEM_HOME set to ~/gems directory and GEM_PATH set to the same. Then I try to install rubygems with
~/bin/ruby setup.rb
The installat...
Everytime I run rake or most rails commands, I get an annoying warning. I'm still a beginner with Ruby/Rails, and I would like advice on how to hack boot.rb to stop the annoying warning. I'm using Rails 1.2.6 and RubyGems 1.3.1. (I haven't upgraded Rails to 2.x because I'm still learning Rails from a book that uses 1.2.x.) I'm gratef...
I am trying to install the "libxml" Gem (http://libxml.rubyforge.org/install.xml) and it says that libxml requires a few other libraries to be installed in order to build and function properly:
* libm (math routines: very standard)
* libz (zlib)
* libiconv
* libxml2
I installed RubyGems but I wonder if "libiconv" for...
So, I've been writing a bunch of ruby gems recently, and one thing I would find convenient is to include the current version (as specified in the gemspec) in the rdoc-generated documentation for my libraries, and in the OptionParser-generated --help sections used by my scripts (which I'm distributing via gem). Any way I can make it easy...
Hi,
I had a rails 2.2 app running, when I tried to add the latest rspec plugin to it. I did that checking it from github with the script/plugin install command. That made some rake task to stop working, I googled for a while and found that I had to upgrade RubyGems. I did that and got the following error:
uninitialized constant Gem::Ge...
Hi,
I want to access MySQL through ruby on a shared linux server. I figure I need to use the DBI module, but I can't seem to access it. I installed it as follows:
gem install -r dbi
It couldn't install it in the normal location, since I'm on a shared server and don't have permission:
WARNING: Installing to ~/.gem since /usr/lib/rub...
Installing Merb on Ruby Enterprise Edition (OS X) throws this error, any ideas?
sudo gem install merb
ERROR: Error installing merb:
invalid gem format for /opt/ruby-enterprise-1.8.6-20090113/lib/ruby/gems/1.8/cache/ParseTree-3.0.2.gem
Deleted the gem cache but the problem persisted. It seemed to manage to install some of the gems th...
I'm having significant trouble installing Ruby on Rails.
I installed Ruby with apt-get When I tried installing Ruby Gems, the installer consistently hung indefinitely on installing ri, so I tried installing Ruby from source instead. I had the same problem, so I installed Ruby Gems without ri or RDoc. I don't know if this is relevant to...
I am looking for a simple and automated way to store the page cache on S3 (and of course cloudfront.) I know of a plugin that does this with the fragment cache, but before I create it myself, wanted to tap into the collective wisdom here :)
Edited: To make myself more clear, I am not looking to use S3 to serve the files, but rather, th...
Is it possible to conditionally set a dependency on a gem at install time? Here's my situation which will hopefully clarify the question.
There is a gem I maintain that depends on the json gem. However, I frequently use jruby which has a port of the json gem that's called json-jruby. To work around this I have to build two separate gems...
Having the same problems as this post, except I don't think the solution is the same unfortunately.
I'm getting this error message:
Rails requires RubyGems >= 0.9.4. Please install RubyGems
when I run a script/runner job in Cron, but it works perfectly fine when I run it in a terminal on the same server.
The rails server also runs f...
I want to install a GC Patched Ruby to do a memory profiling on my app. I followed the instructions at http://guides.rubyonrails.org/performance_testing.html#gc and installed a ruby instance at my home dir (I already have another "official" instance for development). This GC Patched ruby instance is working fine.
The problem is when I n...
I'm trying to use Chronic inside my non-rails project. When I try to get the
specs with 'spec' I get the following error:
$ spec spec/parsers/parser_english_spec.rb
/Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in `gem_original_require': no such file to load -- chronic (LoadError)
from /Library/Ruby/Site/1.8/rubygems/custom_requ...
I am writing a little Shoes app that requires a library I wrote with my regular Ruby installation. My library uses the 'net-ssh' gem and a bunch of other Ruby libraries.
When I run my library directly with regular ruby (it has its own command-line interface) like this:
ruby my_lib.rb
...all is fine. But when I try to require it withi...