Note that there are some explanatory texts on larger screens.

plurals
  1. PORake gems:install yields error when following declarative authorization Railscast
    primarykey
    data
    text
    <p>I'm following Railstcast #188 to get declarative authorization running on my Rails 3 app (using Ruby 1.9.2) and am running into an issue getting the gem to install.</p> <p>Ryan suggests adding it in <code>config/environment.rb</code> with the following:</p> <pre><code>config.gem "declarative_authorization", :source =&gt; "http://gemcutter.org" </code></pre> <p>Then install it with <code>sudo rake gems:install</code>.</p> <p>However when I try that I get an error:</p> <pre><code>/Users/Travis/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems.rb:314:in `bin_path': can't find gem rake (["&gt;= 0"]) with executable rake (Gem::GemNotFoundException) </code></pre> <p>I tried <code>rake gems:install</code>, but got this error:</p> <pre><code>Don't know how to build task 'gems:install' </code></pre> <p>The instructions to install declarative_authorization at <a href="https://github.com/stffn/declarative_authorization" rel="nofollow">GitHub</a> recommend a different process, which I also followed but still couldn't get past <code>rake:gems install</code>.</p> <p>Does anyone know what may be happening so I can get around this?</p> <p><strong>UPDATE:</strong> Here's what my config/environment.rb looks like:</p> <p>RVM -v: <code>rvm 1.10.0-pre</code> Gem list:</p> <pre><code>*** LOCAL GEMS *** abstract (1.0.0) actionmailer (3.0.9, 3.0.5) actionpack (3.0.9, 3.0.5) activemodel (3.0.9, 3.0.5) activerecord (3.0.9, 3.0.5) activeresource (3.0.9, 3.0.5) activesupport (3.0.9, 3.0.5) addressable (2.2.6) arel (2.0.10) aws-s3 (0.6.2) aws-sdk (1.3.2) builder (2.1.2) bundler (1.0.21 ruby) cocaine (0.2.1, 0.2.0) erubis (2.6.6) faraday (0.7.6, 0.7.5) fastercsv (1.5.4) gemcutter (0.7.1) heroku (2.14.0) httparty (0.8.1) i18n (0.6.0, 0.5.0) jquery-rails (1.0.19, 1.0.16) json (1.6.5) launchy (2.0.5) mail (2.2.19) metaclass (0.0.1) mime-types (1.17.2) mocha (0.10.3, 0.10.2, 0.10.0) multi_json (1.0.4) multi_xml (0.4.1) multipart-post (1.1.4) nifty-generators (0.4.6) nokogiri (1.5.0) paperclip (2.5.2, 2.5.0, 2.4.5) pg (0.12.2, 0.12.0, 0.11.0) polyamorous (0.5.0) polyglot (0.3.3) rack (1.2.5, 1.2.4) rack-mount (0.6.14) rack-test (0.5.7) rails (3.0.9, 3.0.5) railties (3.0.9, 3.0.5) rake (0.9.2.2, 0.9.2, 0.8.7) rake-compiler (0.7.9) ransack (0.6.0, 0.5.8) rdoc (3.8) rest-client (1.6.7) rubyzip (0.9.5) simple_oauth (0.1.5) sqlite3 (1.3.5, 1.3.4) sqlite3-ruby (1.3.3) term-ansicolor (1.0.7) thor (0.14.6) treetop (1.4.10) twitter (2.1.0, 2.0.2) tzinfo (0.3.31, 0.3.30) uuidtools (2.1.2) xml-simple (1.1.1) </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload