(Disclaimer: I am quite new to RubyGems.) I have a Sinatra app where I had a ton of require
keywords so I wanted to move them into a Gemfile. So far all of them (DataMapper, Prawn, etc) work fine, until I run into this:
gem install sinatra-static-assets
and it has this error message: Permission denied - /Users/daryll/.rvm/gems/ruby-2.0.0-p247/gems/sinatra-static-assets-1.0.4/.gitignore
. I've tried bundler also but there is the same error message.
Tried forcing it via a sudo gem install
(don't know if that works) and it doesn't seem to work (I am able to run the app but the I get an "undefined method stylesheet_link_tag
" which means the gem isn't being seen?). What gives?
Gemfile
source 'https://rubygems.org'
gem "sinatra", "1.4.3"
gem "sinatra-static-assets", "~> 1.0.4"
gem "json", "~> 1.8.0"
gem "data_mapper", "~> 1.2.0"
gem "dm-sqlite-adapter", "~> 1.2.0"
gem "prawn", "~> 0.12.0"
gem "active_support", "~> 3.0.0"
Config.ru
require 'bundler'
Bundler.require
require './app'
run Sinatra::Application