rubygems

Gem Load Error about whois command and removed cache

Hello, I have an awesome trouble with Gem. After executing this command: rm -f /usr/local/lib/ruby/gems/1.9.1/cache/* I can not do any thing. If I try for instance: gem cleanup I get this kind of answer: /usr/local/lib/ruby/gems/1.9.1/gems/gemwhois-0.1/lib/gemwhois.rb:3:in `require': no such file to load -- rubygems/commands/whois...

Ruby JSON.pretty_generate ... is pretty unpretty

I can't seem to get JSON.pretty_generate() to actually generate pretty output in Rails. I'm using Rails 2.3.5 and it seems to automatically load the JSON gem. Awesome. While using script/console this does indeed produce JSON: some_data = {'foo' => 1, 'bar' => 20, 'cow' => [1, 2, 3, 4], 'moo' => {'dog' => 'woof', 'cat' => 'meow'}} som...

Error Building Gem

I tried to install the following gem: http://github.com/maxjustus/sinatra-authentication on Windows 7 running Ruby 1.9 from the One-Click Installer. I got the following error: Microsoft Windows [Version 6.1.7600] Copyright (c) 2009 Microsoft Corporation. All rights reserved. C:\Users\Joel>gem install sinatra-authentication Buildin...

which ruby twitter library/gem to use?

there is a list of ruby gems for twitter could anybody recommend me one that is good to start to learn/use? that have some history of development etc etc? I want to the stuff below on my linux box search for keywords and follow autofollow rewteet ...

Passing Parameters to Child Tasks from a Parent Task in Rake

I am new to the world of Rake and currently writing a Rake Script which consists of various tasks depending on the arguments passed to it on runtime. From some Tutorials over the web, I figured out how to pass parameters to the Script as well how to make a task which is dependent on other subtasks. For reference, I have mentioned a sam...

require rubygems works in irb but not in script

I have Ubuntu 9.04 Ruby 1.8 Rubygems 1.3.5 In irb, irb(main):002:0> require 'rubygems' => true In a script $ ./test.rb ./test.rb:2:in `require': no such file to load -- rubygems (LoadError) from ./test.rb:2 $ gem environment RubyGems Environment: - RUBYGEMS VERSION: 1.3.5 - RUBY VERSION: 1.8.6 (2009-08-04 patchlevel 383) [i686...

Mysql gem troubles with Snow Leopard upgrade

I have done everything that is on the web (i think) i have the new 64 bit xcode that came with snow leopard installed completely removed mysql, removed gems compeltely, removed rails installed mysql 64 bit, installed gems, installed mysql gem with the env ARCHFLAGS set I still get this nasty NameError: uninitialized constant MysqlCom...

Why do I get a NoSuchMethod error running Warbler?

I'm getting the following error when running warble under both jRuby 1.3 and 1.4. I'm new to warbler, any suggestions what to try next? $ warble war WarblerWar.java:70:in `addEntry': java.lang.NoSuchMethodError: org.jruby.util.ByteList.getUnsafeBytes()[B from WarblerWar.java:63:in `addEntries' Other info that might help: It's...

Can you in any way interface Ruby Gems with PHP, Python, etc.?

Stupid question, and forgive me for asking, but someone is asking me, and I am not a super expert with Rails yet. Suppose I have some Rails gem I write. Now suppose a customer has some other framework, like Django or CakePHP, and I want to provide the functionality offered by my gem (eg. CRUD for automotive data) to them as a module in ...

Missing Required Gems - javan-whenever and cron job in rails

Hi, I have finally managed to get javan-whenever gem working on my site5 server, and updating the crontab is quite easy, however whenever a cron job is run with the code that is generated, i get a "missing required gems" error where it lists about 8/10 of my gems. Has anyone else had this problem? If so, what would the solution be. T...

Is there a quick way to get a list of gems that a ruby script needs?

I've been hacking around with Ruby a little and I have been wondering if there is a utility or tool that you can use to determine all the gems that a ruby script requires. Basically, I have been finding it kind of annoying having to work with a ruby script that I didn't write, I don't know all the gem dependencies for, and I don't know ...

Rails - handling global site settings

I'm developing a new rails application which is supposed to be installed several times in order to implement several sites. There are some things, like the "Site Title" or the "Default Number of Items per Page" that clearly belong to a "global settings" table / config file. I've made a list of the things I think I'll need: ActiveReco...

Unpacking gems [Rails 2.3.5]

I have the following gems defined in my environment.rb file: config.gem "authlogic" config.gem "paperclip" config.gem "pauldix-feedzirra", :lib => "feedzirra", :source => "http://gems.github.com" config.gem 'whenever', :lib => false, :source => 'http://gemcutter.org/' I have them installed on my local computer and everything i...

Ruby Gems Either/Or Dependency?

My VCR gem currently depends on FakeWeb. I have it declared as a dependency in my gemspec. I'm working with the auther of WebMock (a library that provides similar functionality to FakeWeb) to get VCR to work with WebMock as well, so that users of VCR could use either FakeWeb or WebMock as the http stubbing library. When it comes time ...

Gotchas for writing rubygems

There have been questions with answers on how to write rubygems, but what should you avoid in writing a rubygem? What can cause problems for people using your rubygem? ...

403 Error when Authenticating using tumblr gem for rails application

I have a ruby-on-rails application that wishes to utilise the tumblr gem for adding posts when an action is taken (eg: creating a blog post) I currently have the tumblr gem installed and can manage to fetch my posts using @tumblruser = Tumblr::User.new('myemail','mypassword') However when i go to add a post where it asks me to pass t...

RVM and rails 3.0 beta: rails executable is invalid

after installing gem install rails --pre then trying rails -v I get the following error /home/luke/.rvm/gems/ruby-1.8.7-head@rails3pre/gems/activerecord-3.0.0.beta2/lib/rails: Is a directory - /home/luke/.rvm/gems/ruby-1.8.7-head@rails3pre/gems/activerecord-3.0.0.beta2/lib/rails (Errno::EISDIR) from /usr/bin/rails:19:in `load' f...

Rails: vendor/gems or vendor/plugins?

I'm to tracking dependencies with git-submodules in my rails app. So far I've added submodules for things like, haml, shoulda, and authlogic to 'vendor/plugins'. I've seen indications that I should be using 'vendor/gems' instead though. Question: which directory is the appropriate place to put dependencies being tracked as submodules? I...

Ruby: Any gems for threadpooling?

Is there a gem for threadpooling anyone can recommend? ...

Ruby 'gem install' won't work

I am behind a firewall with internet blocker installed. I have power user previlage so I was able to install from git etc. But I am facing this only when I try installing 'gem'. Here is what I get, I think it says it recieved some error instead of a gzip. Is there any config that I need to change? or any port or anything?? does it use ...