rubygems

Rails ACL plugin that works with devise/warden?

As title, warden is very pluggable, I wonder if there is anything works with warden/devise? ...

Storing publicly available gems on my own gem repository

I have a Ruby application (not using Rails) that use my own Ruby gems. I have these gems hosted on a local gem repository server. Some of these gems have dependencies on other publicly available gems from gemcutter (ex: haml, curb). Would it make sense to vendor/mirror these publicly available gems on my local gem server so that I would...

What is the difference between rake rails:freeze:gems and rake gems:unpack ?

As far as I know both rails:freeze:gems and rake gems:unpack are placing the gems to /vendor. rails:freeze:gems places them to /vendor/rails, gems:unpack place them to /vendor/gems. The point for me seems to be the same, however. In both cases the goal is to fix the gems and their versions as they were during the development. Is there an...

mechanize and redirecting (ruby)

I thought that mechanize follows redirection by default ... by my script ends at the redirection page. How can I handle this? require 'rubygems' require 'mechanize' agent = WWW::Mechanize.new page = agent.get("http://www.vbulletin.org/forum/index.php") login_form = page.form_with(:action => 'login.php?do=login') login_form['vb_logi...

Rails gem or code to flag malicious user behavior in real-time?

Is there an existing gem or code that will flag malicious user behavior in real-time? i.e. not something where I manually comb the log files for 404s or suspicious accesses (e.g. sql injection attempts, js inserted into text fields, etc.?) For instance, today I noticed requests like this in the log. ActionController::RoutingError (No r...

I am getting this error when run ror project "C:/InstantRails/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require': no such file to load -- haml (MissingSourceFile)"

I am getting this error when run ror project "C:/InstantRails/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require': no such file to load -- haml (MissingSourceFile)" ...

How to add task With hoe Rakefile

I'm creating a gem package with hoe library. The package shoud do "cd ext/lib/ && make " when "gem install pkg.gem" How to add task when package installing. # -*- ruby -*- require 'rubygems' require 'hoe' file ["ext/lib/*.c", "ext/lib/*.h"] do Dir.chdir "ext/lib" do sh "make" end end Hoe.spec 'mypackage' do |p| p.develope...

What's the difference between `require` and `gem`

What's the difference between require 'cool_lib' and gem 'cool_lib'? ...

MySQL Install: ERROR: Failed to build gem native extension.

I'm trying to get MySQL installed to the latest version due to some installation going wrong somewhere along the line. I run the command gem install mysql and I receive the following: Building native extensions. This could take a while... ERROR: Error installing mysql: ERROR: Failed to build gem native extension. /S...

What is the inverse rake operation to rake gems:unpack?

I would like to unfreeze the gems which where previously rake gems:unpacked. What is the operation for this? So far I know only the method of rm -r vendor/gems. For rake rails:freeze:edge there is rake rails:unfreeze. Is there such inverse rake task for gems too? ...

problem with rubygems in windows

Hi, I built Ruby 1.9 from scratch in Windows using MinGW, now I am trying to set up the environment and am having great difficulties getting the 'gem' command to work. First not even 'irb' would work, so i added a bunch of paths to the RUBYLIB environment variable and now that works ok. But whenever i run 'gem' i get this error: http:/...

when I am deploy my ror application on production then I am getting following error

in `gem_original_require': no such file to load -- haml (MissingSourceFile) but this gem already istalled. I have also plugin for this path :-/home/techvant/rails_app/techease/vendor/plugins/haml/init.rb this init file having following code : - begin require File.join(File.dirname(__FILE__), 'lib', 'haml') # From here rescue ...

RMagick freezes ruby processes when required on OS X Snow Leopard

I've got quite a strange problem. I've installed ImageMagick via homebrew. I've installed rmagick-2.12.2 and rmagick-2.11.2 with no issues. I get no errors on installation of either. ImageMagick seems to be installed and in my path: $ convert --version Version: ImageMagick 6.5.6-5 2010-01-30 Q16 OpenMP http://www.imagemagick.org Cop...

Ruby : How to write a gem ?

I'd like to write a package for Ruby and make it available as a gem. What are the tools, steps and pitfalls ? Are there any good tutorials, screencasts, etc., which helped you learning how to do it ? ...

Memcached rubygem + Rlibmemcached argument error with memcache_mget()

I am getting an exception when using Evan Weaver's Memcached gem (as Memcached::Rails.new) -> (http://github.com/fauna/memcached) and calling get_multi() ArgumentError: wrong # of arguments(2 for 4) from /usr/local/lib/ruby/gems/1.8/gems/memcache-auth-1.0.1/lib/memcached/memcached.rb:384:in `memcached_mget' from /usr/local/lib/ruby/gems...

Why use a nested Ruby module for version information?

I've been looking at the source code of a few gems lately. One idiom that I keep seeing is the use of a nested module containing version constants that are joined into a version string i.e. variations around this sort of thing: module ChunkyBacon module Version MAJOR = 0 MINOR = 6 TINY = 2 end VERSION = [Version::MAJ...

Can gems be used by ruby code compiled with macrubyc

MacRuby 0.5 includes a ruby compiler built on LLVM called macrubyc. Does anyone know if it would be possible to dynamically load gems from compiled code? Or compile the gems and link them in? Is this planned? Or how compiled code will be able to make use of gems in general. ...

trouble installing ruby gem json on my mac

I get this warning when trying to install the json module via ruby gems. Any ideas? Mac-Mini poulh$ sudo gem install json Password: WARNING: File '/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8 /specifications/json-1.2.0.gemspec' does not evaluate to a gem specification ...

RSpec can't find Cucumber gem

When running rspec I get the following error: no such file to load -- cucumber-rails /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require' /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in `require' /usr/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:158:in `requi...

Getting the skype status of user in a rails application

I have a rails application in which user provides his skype address.I want to able to determine the skype status of the user(online or offline) when some one sees his profile. How can i do that in my application? Does any know of a ready to use gem/plugin? ...