gem

Rails plugin to clean up (reformat) html output?

Is there any plugin (gem) that after rendering page can clean and reformat it? By cleaning I mean removing unnecessary new lines and whitespaces. ...

RubyGems Environment (Snow Leopard)

Greetings, My question is why do I have 3 separate gem paths. My 'gem environment' command displays the following: GEM PATHS - /Library/Ruby/Gems/1.8 - /Users/adam/.gem/ruby1.8 --This one makes sense to me - /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8 Why the two separate "system" paths? Thanks...

Ruby Gems with Persistent data

I want to create ruby application (not rails). This is a console app which will need to persist some data. I'm using pstore as the database. I want to deploy this application as a gem. My question is: where does my data live? Currently I've created a data directory as a sibling to the bin directory in a standard gem layout. I would th...

Unable to install MySQL on Mac OS X

Hey, I'm having the exact issue as described in this question: http://stackoverflow.com/questions/354194/mysql-installation-troubles. Unfortunately none of the answers helped me (and it's closed). I try to learn Ruby on Rails and don't get MySQL working (so it is programming related). I typed: rake db:create and got: !!!The bundled m...

Why do names of Rails gems & plugins sometimes contain author name?

When it comes to adding gems/plugins I notice that sometimes the author name is prepended to the gem/plugin name, whereas other times it isn't. Is there any reasoning behind this? Example: config.gem "thoughtbot-factory_girl", :source => "http://gems.github.com" Why not have it as: config.gem "factory_girl", :source => "http://gems....

Using gem bundler and rails templates together

I'd like to make myself a nice little rails template to DRY up my development process. At the same time I'd like to use gem bundler. How would you go about doing this or do you consider them mutually exclusive? ...

Building a ruby gem for Rails applications

As a Rails developer I feel a bit stupid asking this question but hopefully I will learn something new and someone can put me out of my misery! In my rails applications I use (other peoples) gems all the time, I also use plugins from the community or my own. I understand the benefits of use gems over plugins as they are version-able, se...

How do you get value of a pixel from a webcam in puredata?

I'm new to puredata and am really impressed with it so far. What I need to do is to access the webcam and extract the luminosity (or RGB, conversion is easy) values of specific pixels. Is this possible? ...

Proper way of testing gems

If a gem has rails dependencies, do you think it is better to write the gem tests in a way they can be run standalone or run them under a rails project? ...

Rails rack 1.0 error

Hi! I have this error when I try to start script/server: /opt/ruby1.8/lib/ruby/site_ruby/1.8/rubygems.rb:827:in `report_activate_error': RubyGem version error: rack(1.0.0 not ~> 1.0.1) (Gem::LoadError) from /opt/ruby1.8/lib/ruby/site_ruby/1.8/rubygems.rb:261:in `activate' from /opt/ruby1.8/lib/ruby/site_ruby/1.8/rubygems.rb:68:in `ge...

Install Mysql Gem for Ruby along with JRUBY Gem

Hi. I have Jruby gem Mysql installed on my machine. However due to some reason, I had to move to ruby instead of ruby and everything seems to be working fine except that mysql gem for ruby isn't installed and now when I try to install Mysql gem i get following error: Building native extensions. This could take a while... ERROR: Error...

Rails Gem Bundler breaking Dependencies

I recently installed the Bundle gem (stable 2.3.x) with a integrated 3.0 release. The documentation for installing 2.3.x is weak, so I'm looking for help here. I've done everything from this article on installing and configuring gem bundler (Installing gem bundler, defining Gemfile, adding preinitializer.rb, requiring bundler_gems/en...

How to silence gem errors after switching to bundler

I recently switched to using bundler and now anytime I run a script under the scripts/ folder in my rails app I get the following warning: config.gem: Unpacked gem environment.rb in vendor/gems has no specification file. Run 'rake gems:refresh_specs' to fix this. config.gem: Unpacked gem environment.rb in vendor/gems not in a versioned ...

Will upgrading gems break old Rails applications?

I have bunch of Rails apps running on Rails 1.x. I need to upgrade the gems so the question is, will these old apps still work after I upgrade gems? Thank you. ...

Sass options in Rails when installed as a Gem

I have Haml/Sass installed as a Gem and using it with Rails. I can't figure out, how to pass options like template_location and style to Sass. Sass::Plugin.options doesn't work (since Haml/Sass isn't installed as a plugin). The gem is required through Rails::Initializer#gem. Thanx a lot for help! ...

How to develop a gem in staging environment?

I am trying to hack through a forked gem (buildr). As such I cloned it from github and began to butcher the code. The official gem is installed on my system (under /usr/lib/ruby.../gems/buildr...). There is an executable which I need to use in my dev process - buildr. Now I want the buildr executable and the library to point to my forke...

Rails deployment can't find correct gem version

I'm doing my first deployment of a Rails app and using capistrano. The installation aborts with the following error: *** [err :: plantality.com] RubyGem version error: will_paginate(2.2.2 not ~> 2.3.11) but I've already vendored 2.3.11 to vendor/gems and have the following in my environment.rb (which google tells me is the correct thi...

Where does JRuby look for scripts?

Running the command jruby -S spec gives the following error No such file, directory, or command -- spec The location of spec is /usr/bin, which is in the path. Rspec is installed. MRI Ruby can find the script. JRuby can find the rspec gem. So what goes wrong? ...

Ruby Enterprise Edition - Rake not found

Hi, I've just had a new VPS set up and have installed Passenger with Ruby Enterprise Edition. However, I can't get rake to work. /opt/ruby-enterprise-1.8.7-2010.01/bin/gem list * LOCAL GEMS * actionmailer (2.3.5, 2.2.3) actionpack (2.3.5, 2.2.3) activerecord (2.3.5, 2.2.3) activeresource (2.3.5, 2.2.3) activesupport (2.3.5, 2.2.3) fa...

Need recommendations to create an event-based messaging and badging system in Rails

I want to create an event-based notification and badging system that would award users when they accomplish certain goals. Goals might include: Posting 20 entries on a forum -> alert on homepage highlighting user, award of badge Logging in to the site 10 days straight -> congrats to message to user on homepage Commenting on 10 forum p...