rubygems

rake tasks are not discovered in rails 3

Hi, I have trouble getting started with rails 3.0.0, because it just doesn't load the rake tasks rake gems:install rake aborted! Don't know how to build task 'gems:install' rake -T rake about # List versions of all Rails frameworks and the environment rake db:create # Create the database from config/database.ym...

Rails new GEM_HOME

I recently upgraded to Ruby 1.8.7 (had an issue with 1.9.2) and had to reinstall RubyGems. Now my project can't see any of the old gems in my GEM_HOME, is there a way to point my new gem binary to my previous GEM_HOME? I can't find anything online and it's a big pain to install them all again one by one. I'm also on a Mac, so it's at:...

Fire up a web browser for a folder?

Is there an easy way to fire up a web browser for a folder? eg. I am in a folder that contains a website (index.html and other files) and I want to browse the site through a browser. Is there a gem that I just launch to make this folder browsable? In this way I don't have to install nginx just for a specific folder. And when you insta...

How to manage multiple gemsets and ruby versions with RVM ?

I am really confused by the explanations given in RVM website. The relation between different ruby interpretors and gemsets are not clear to me. According to me, it is like this - My Account in my Mac have one rvm That rvm installs and manages set of different versions of ruby interpretors. each ruby version has set of gemsets. Am ...

Thrift gem and JRuby

I just recently installed JRuby and the Thrift gem after using it in MRI. I'm running into a problem where if I require 'thrift' I get the message "Unable to load thrift_native extension. Defaulting to pure Ruby libraries." If I then try and require the code thrift generated in ruby I'll get this error: "NameError: uninitialized constant...

Rails - Searchlogic to search condition as an array of value

I have two models Employee & Unit. Unit has many Employees. I am using SearchLogic to search employee model. What is the equivalent of below SQL in Searchlogic employees.unit_id IN (1,2,3) I have tried both unit_id_equals_all[] unit_id_equals_any[] But nothing works. Can anyone help? Thanks, Abhilash ...

SimpleCov rspec and cucumber separately

Could you tell me how to setup simplecov to test models with rspec and controller with cucumber only? I don't like it that rspec and cucumber coverage are mixed together... ...

Porting Rails 2 application to new server

I've posted a couple other questions during this process, but I have a better idea of what I'm trying to do so I thought I'd ask about that. I've inherited a Rails 2.2.2 application, which is currently running in production form on a server I have access to. I'm trying to port that application over to my server, version control, etc. I ...

Is there any Rubygems or Rails method that can display how long it took to generate the webpage, and time in controller vs in view?

Alternatively, I can write a bunch of Time.now and print out the subtractions but is there a standard way it can be done by gems or by Rails' standard and conventional method? ...

Gem Install memcached-northscale error

Trying to install memcached-northscale and getting a weird error. Any help would be appreciated. $ sudo gem install memcached-northscale Building native extensions. This could take a while... ERROR: Error installing memcached-northscale: ERROR: Failed to build gem native extension. /System/Library/Frameworks/Ruby.framework/Versions/...

Bundler can't find Ruby gem that appears on website

I installed Bundler on a pre-Rails 3 application and am trying to use it to install gems. My Gemfile contains the following lines: source :rubygems [...] gem "RubyInline", "3.8.1" However, when I run bundle install I get this error: Fetching source index for http://rubygems.org/ Could not find gem 'RubyInline', required by 'memcache-...

Submitting a ruby gem via the API fails with HTTP error code 422

Hi, I'm trying to upload my FAKE project (http://github.com/forki/FAKE) to RubyGems from F#: let mutable rubyGems = "http://rubygems.org/api/v1/gems" let PushGem gemFileName authCode = let client = new System.Net.WebClient() client.Headers.Add(Net.HttpRequestHeader.Authorization,authCode) logfn "Uploading gem %s to %s." ...

I deleted a rails gem in the wrong way - what should I do?

So I installed rspec 2.0 beta 22 and then I deleted the folder in the library folder on my mac (I know i'm an idiot). Now I can't reinstall or uninstall. HELP!! Thanks ...

ruby version and gem's ruby version do not match

RubyGems is reporting a different ruby version than running ruby --version. Looking for suggestions on diagnosing and fixing this. OS is OS X 10.5. lando-macbook:rubygems-1.3.7 lando$ gem env RubyGems Environment: - RUBYGEMS VERSION: 1.3.7 - RUBY VERSION: 1.8.6 (2009-06-08 patchlevel 369) [universal-darwin9.0] - INSTALLATION DIREC...

How to use a gem in Rails 3 without referencing it in the Gemfile.

I'm wondering how to make a gem accessible in a Rails 3 app without putting a reference to it in the gemfile. I want to do this with ruby-debug (I'm using ruby-debug19). I use this to debug, but not everybody on my team does and forcing the dependency just so I can use it doesn't seem very diplomatic. Is there another way? If it ends up...

rubygems 1.3.7 TypeError (in 'merge') during installation on Ubuntu

While installing ruby-1.9.2-p0 with rvm on an updated Ubunutu x86_64, I keep getting an error in `merge': can't convert String into Hash (TypeError). All apt packages in rvm notes and those found in the rubygems manual have been installed. I believe the error is resulting when RVM is attempting to install rubygems. I also get the same e...

Errors Installing mysql2 gem via the Bundler

I am trying to install the mysql2 gem via the Bundler, but it keeps dying with the following error: ** executing command /home/cc_rails/.rvm/rubies/ruby-1.9.2-p0/lib/ruby/1.9.1/rubygems/installer.rb:483:in 'rescue in block in build_extensions': ERROR: Failed to build gem native extension. (Gem::Installer::ExtensionBuildError) /home/cc...

Carrierwave or Dragonfly

I have been looking into rails file upload tools and the ones that seemed the most appealing and interesting to me were carrierwave and dragonfly. From looking around it seems like carrierwave takes the more traditional style where you can process the file on save whereas dragonfly is middleware so it allows you to process on the fly. ...

Ruby on Rails -- How can I update ruby to >= 1.8.7

Hello, I've been trying to figure this out but its starting to make me want to pull my hair out. I'm installing RoR on a new machince using instantrails. Whenever I run "gem update --system", I get the error for several gems? that "activesupport requires Ruby version >= 1.8.7" I run "ruby -v" and it returns "ruby 1.8.6 (2007-09-24 pat...

avoid http checking when installing a home made gem

Hi, I'm working on a set of gems for my application. When installing any of my own gems, the gem program will check rubugems specs (possibly for dependencies). With a verbose flag I can see messages like : GET http://rubygems.org/latest_specs.4.8.gz 302 Found GET http://production.s3.rubygems.org/latest_specs.4.8.gz 200 OK GET http...