rubygems

In Rails, if not using Bundler, what is the most preferred way of freezing a gem into the project?

Our project is Rails 2.2.2, maybe it can't use Bundler? (or maybe for some other reasons, Bundler cannot be used) Then in that case, what is the most preferred way of freezing the gems into the project source tree? Some that I know of are: rake gems:freeze needs gemsonrails and it doesn't work with the current gem 1.3.7 rake gems:...

using geokit or other ruby gem to calculate the center of a series of geo coordinates.

I've been using the geokit and geokit-rails gem for rails for awhile but one question I haven't found answered is how to find the calculated aggregate center for a collection of points. I know how to calculate the distance between two points, but not more than 2. My reason is, I have a series of points all in the same city... all thing...

How to install mysql on a new machine for an old app ?

Not exactly sure how to go about this. My app's database.yml development: adapter: mysql encoding: utf8 reconnect: false database: application-dev pool: 5 username: root password: angles123 socket: /tmp/mysql.sock I was thinking that it would be wise to go ahead and mysqladmin -u root --password=angles123, and then on...

Looking for 'act_as_sharable'ish gem

Is there a gem/plugin for rails that would facilitate resource sharing? E.g. user is sharing his photos (to view, comment) with other users. ...

Tell RubyGems to always search remote gems

hi all, is there a way to tell rubygems to always search for remote gems (instead of local)? I tried adding the following line to my ~/.gemrc gem: --remote but the problem is, that when i do gem list i get the following result ~$ gem list *** REMOTE GEMS *** - (1) 10io-jekyll (0.7.0) 1234567890_ (1.0) 2Performant (0.0.8) 360_servi...

With Rails, how to convert code which used Facebooker to using Facebooker2?

There is code to use Facebooker gem (which uses the old Facebook REST API). Does someone have experience how to convert those code to using Facebooker2, which uses the new Facebook Graph API? For example, Facebooker has Facebooker::Session and Facebooker::User and they are both gone in Facebooker2. I can't find too much docs on the tw...

In Ruby / Rails, what if a gem Foo depends on Bar 1.2.2, and cannot be Bar 2.0, but Wala depends on Bar 2.0?

In other words, can't the versions have conflicts and is there a way to solve it? Such as Foo depends on Bar and Foo doesn't support Bar 2.0, but Wala need to have at least Bar 2.0, so can Rubygems or Bundler or any mechanism handle it? ...

If a Rails app uses "require 'gem_name'" instead of "gem 'gem_name'" or "config.gem 'gem_name'", will it be faster?

because gem 'gem_name' # Rails 3.0 or config.gem 'gem_name' # Rails 2.x will load the gem no matter what the controller is... will a require 'gem_name' in the controller source code actually make the Rails server run faster because not every controller will load that gem? ...

Heroku install: missing gem isn't missing

Trying to deploy an app to Heroku -- first time app and deployment -- and keep getting the following error when I'm trying to migrate the db: Missing these required gems: authlogic You're running: ruby 1.8.7.253 at /usr/ruby1.8.7/bin/ruby rubygems 1.3.7 at /home/slugs/327637_0db78d3_8f84-7ba6678a-ff5d-4646-8320-f58c88156465/mnt...

ruby-hmac rake:gems:install doesn't work

I added config.gem "ruby-hmac" in environment.rb Then I run: rake gems:unpack Then rake:gems:install But when I ruby script:server I always got this error message: Missing these required gems: ruby-hmac You're running: ruby 1.8.7.249 at /Users/macbookpro/.rvm/rubies/ruby-1.8.7-p249/bin/ruby rubygems 1.3.6 at /Users/macbookpr...

Ruby Strange Error

Whenever I require a file in ruby or irb I get this error: LoadError: no such file to load -- (insert any filename).rb from <internal:lib/rubygems/custom_require>:29:in `require' from <internal:lib/rubygems/custom_require>:29:in `require' from (irb):1 from /usr/bin/irb1.9.1:12:in `<main>' It happens even if the file ex...

Uninstalling rails and gems, getting error "cannot uninstall, check 'gem list -d ...'

I'm going to start with the usual noob line, "I'm new to rails". Oh, and I'm running Mac OSX 10.6.4 I've been following a bunch of guides to get set up, specifically these two here and here. The guides are great, the reason I'm using the second one is because of RVM and the reason I'm using the first is for MYSQL. Anyway, when I star...

RVM and global gems

I'm running Mac OSX 10.6.4 and have installed RVM. Its been great so far, I really love the way it lets me manage having multiple versions of rails and ruby on the same machine without headaches! However, I don't want to have to install certain gems (such as passenger) for each setup. Is there a way to share gems between gemsets? I ha...

On Windows, can't we have different versions of Ruby and Rails (or Gemsets) just by setting the PATH?

As I remember, on Windows, all the gems get installed relative to c:\ruby192, so can we actually have different paths such as c:\ruby187_rails238 c:\ruby187_rails301 c:\ruby192_rails301 c:\ruby192_try and therefore have 2 Ruby installations and 2 gemsets for each of them, and create more gemsets as needed this way. (just make sure to...

In Rails, why sqlite works without config.gem 'sqlite3-ruby'

With a new Rails 2.3.10 project, the file config/environment.rb has the following line commented out: # config.gem "sqlite3-ruby", :lib => "sqlite3" but for some reason, I tried a scaffold foo, and start the rails server, and the app is running. I thought the requirement is, every gem the app needs, it has to be listed in config/en...

What is need to build native extension for Gems on Windows? (RubyGems)

More and more gems I run into requires building "native extensive", such as RedCloth. Are there tools that are open-source or free that is sufficient to do that? I heard MS Visual Studio also has a free version. Will that be enough to build native extensions? ...

How to start a brand new process in Rails, without inherit current environment variables?

I'm developing an master rails app which controls other rails apps. It has a bash script to start those rails apps, and it works well while it's invoked in the command line manually. But if I invoke it in the matter rails app, using backticks, system, or exec, the script will fail. The error message is: unicorn_rails worker[0] -c ../c...

Installing MYSQL and passenger gems, getting no definitions for documentation

I'm running Mac OSX 10.6.4 and setting up rails for the first time. I've been following a bunch of guides to get set up, specifically these two here and here. Also, I know this question has been asked before, but nothing has helped me and my circumstances are a bit different. First, let me give you my setup. I've installed Xcode, ...

Strange behavior between rails and irb

If I drop in to irb and do require 'atom' I can successfully include the gem but if I try to include it in my controller in rails I get no such file to load -- atom when I visit the page in the browser. What's going on here? Here's the complete stack trace: C:/Ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_r...

Rails - any plugin/gem for creating calendars

Hi, I was trying to find a gem or plugin that had a cool looking calendar control. Is there anything that someone can recommend? Is there a way to display a set from 2 different months like dec. 11 - jan. 11? ...