rubygems

How to set specified gem version for Ruby app?

Hey guys, I`ve encountered the problem after updating some gems, so basically all older gems are still available but i cant force application use them. Lets say, i need something like that: require 'rubygems' require 'mygem', '0.1.2' Is there a way to do it? ...

Multiple Markers on Google Map (Fails to display over 10 markers) - Ruby on Rails Environment YM4R Plugin

Hi, I have the following issue. I have a google map (using YM4r + Geokit) within Ruby on Rails, anyhow, i basically have an array of markers which are populated in the following manner @shops.each do |sto| markers << GMarker.new (....) end They are definitely being stored fine as under 10 markers they are displayed just fine. Th...

How to create individual email id to users on my domain through rails ?

I would like to create an email service for all the users on my site for ex [email protected] where users can be able to send and receive personalized emails , Basic feature only send and receive emails in Rails . User can register for email id at xyz.com and send and recieve emails from xyz.com Are there any solution already available i...

RoR plugin/gem for html validtion

I am wondering if there is such a plugin or gem for Ruby on Rails that includes HTML validation (SGML or Tidy) in a testing cycle. I am aware only about this plugin. Looking for alternatives... ...

updating RubyGems on Ubuntu

Does anybody know how to update RubyGems on Ubuntu. The usual way doesn't work: steve@ubuntu:~$ rails /home/steve/www/mynewapp -d mysql create create app/controllers create app/helpers create app/models create app/views/layouts create config/environments create config/initializers ...

Bypassing rack version error using Rails 2.3.5

I'm currently on Dreamhost attempting to run a Rails 2.3.5 app. Here is the situation, Dreamhost's servers have Rails 2.2.2 installed. Of course, I can't update a shared host's rails version, so I froze my Rails in vendor. Rails 2.3.5 requires the rack v1.0.1 gem. Dreamhost uses the rack v1.0.0 gem. So when I try to define: config.gem ...

How do you remove the documentation installed by gem install?

I know it's possible to install a gem without the documentation, but unfortunately, I didn't for the first three months I used ruby. In that time, I managed to install a significant amount of gems, but not once since I started using ruby have I used the documentation on my computer. I always look to docs on the internet. What is the bes...

Cannot load Rails application with gruff gem

I am trying to load a Ruby on Rails application that uses the Gruff gem. I can load Gruff fine in irb, but whenever I try to load the app (via ruby script/server), it crashes. Here's the full stack trace: /opt/local/lib/ruby/vendor_ruby/1.8/rubygems/source_index.rb:303:in `search': undefined method `empty?' for :gruff:Symbol (NoMethodEr...

mysql + ruby = nightmare

Ok, I'm done. I can't understand why I got this error with: rake features It cant' be I can't connect to mysql cause the: rake db:migrate works perfectly. I keep having this error: rake features --trace (in /Users/myname/Projects/rails_app) ** Invoke features (first_time) ** Invoke db:test:prepare (first_time) ** Invoke db:abort_...

Gems not found with Passenger in conservative spawn mode on Mac OS X

We are using Passenger locally on Mac OS X for development. I switched to conservative spawn mode to try to debug a problem with the MongoDB ruby driver. However, after I did this, Passenger can no longer find my gems. I get the application failed to start page with this message: Missing these required gems: aws-s3 >= 0.6.2 ruby-u...

How to freeze a gem that doesn't want to freeze? (rack)

When I try to deploy my rails app to my shared hosting (dreamhost) I get this error: can't activate rack (~> 1.0.1, runtime) for [], already activated rack-1.0.0 for [] So I want to freeze the rack gem in my dev environment, and add it to the project, but even though I have this in my config/environment.rb: config.gem 'rack' Doing ...

Ubuntu 9.10 PATH var/lib/gems/1.8 no such file or dir

Hi, I'm using ubuntu 9.10 and i cant see gems located in /var/lib/gems/1.8/gems , so i cant execute gems like rake for rails. When I write $PATH in the console I get: bash: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/home/dombesz/bin:/var/lib/gems/1.8/bin: No such file or directory I also tried to add to ...

Conditional Dependency in Ruby Gemspec

I'm building a gem that needs a json gem installed in order for it to work. It doesn't matter which json gem: json_pure, json-jruby, or the C-based json. Is there a good way of defining this in a gemspec? This response suggests maintaining a completely separate gem for each version, but it seems like there has got to be a better way. ...

Why can't my Rails app find the gems that are packaged with it?

I've got a Rails app making use of Cucumber and RSpec. We are storing the gems under vendor/gems and trying to get the app building (running tests) in a CI server. When I try to run our tests I'm getting the following error: Missing these required gems: cucumber >= 0.3.11 rspec-rails >= 1.2.6 When I run RAILS_ENV=test rake gems...

mysqlplus is better adapter than ruby mysql?

I want to know if the mysqlplus gem is a better database driver than the common Ruby mysql gem? I used to have some problems in my Rails application, like: ActiveRecord::StatementInvalid: Mysql::Error: MySQL server has gone away ...

How many times was a Ruby gem installed via `gem install` or `gem update`

I am trying to find out how many times a gem was installed via gem install or gem update. For example, Watir 1.6.2: it was installed 97 times via gemcutter (http://gemcutter.org/gems/watir/versions/1.6.2) it is downloaded 4,027 times from http://rubyforge.org/frs/?group%5Fid=104 I have been told that 4,027 does not include installs ...

Packaging precompiled binaries inside of a gem

I've got a ruby web app that uses lilypond to generate sheet music based on user input. I'd like to move the hosting to heroku (I've recently used heroku on a few projects and really liked it, plus my traffic is low enough that it'd be free host it on heroku, for a while at least). However, heroku's dyno architecture doesn't allow you ...

Writing own scaffold generator, exporting as a gem

I have created my own scaffold generator, now it's sitting in my ~/.rails/generator/scaffold directory. How can I make a gem in order to use my generator along other machines I'm using, without the need of copying the ~/.rails folder on every box ? I will push later the gem on Github ...

Rails Community Engine plugin unit tests fail

Community Engine installed fine locally on my mac, but when I try to install it on my web server, it's giving me some trouble. Here's the problem I'm having now, when I run rake test $ [~/projects/polis]# rake test --trace (in /home/mculp/projects/polis) ** Invoke test (first_time) ** Execute test ** Invoke test:units (first_time) ** In...

Rails is not recognizing an installed gem

I tried to install the ruby-hmac gem If I do "gem list", I see it is installed: ... RedCloth (3.0.4) ruby-hmac (0.3.2) ruby-openid (1.1.4) ... However when I try to include it in my Rails project... config.gem "ruby-hmac" I get an error: Missing these required gems: ruby-hmac You're running: ruby 1.8.6.287 at /System/Libra...