Bundle install not finding gem in gem list - ruby-on-rails-3

I am trying to add devise to my application and gem install works, but everytime I run bundle install, it does not find devise in my gemlist. I have tried including the git link and using a specific version, but it still does not find it in my gemfile.
Terminal
$bundle install
$Using rake (0.9.2.2)
Using i18n (0.6.0)
Using multi_json (1.3.6)
Using activesupport (3.2.5)
Using builder (3.0.0)
Using activemodel (3.2.5)
Using erubis (2.7.0)
Using journey (1.0.3)
Using rack (1.4.1)
Using rack-cache (1.2)
Using rack-test (0.6.1)
Using hike (1.2.1)
Using tilt (1.3.3)
Using sprockets (2.1.3)
Using actionpack (3.2.5)
Using mime-types (1.18)
Using polyglot (0.3.3)
Using treetop (1.4.10)
Using mail (2.4.4)
Using actionmailer (3.2.5)
Using arel (3.0.2)
Using tzinfo (0.3.33)
Using activerecord (3.2.5)
Using activeresource (3.2.5)
Using coffee-script-source (1.3.3)
Using execjs (1.4.0)
Using coffee-script (2.2.0)
Using rack-ssl (1.3.2)
Using json (1.7.3)
Using rdoc (3.12)
Using thor (0.15.2)
Using railties (3.2.5)
Using coffee-rails (3.2.2)
Using jquery-rails (2.0.2)
Using bundler (1.1.4)
Using rails (3.2.5)
Using sass (3.1.19)
Using sass-rails (3.2.5)
Using sqlite3 (1.3.6)
Using uglifier (1.2.4)
Your bundle is complete! Usebundle show [gemname]to see where a bundled gem is installed.
Gemfile
source 'https://rubygems.org'
gem 'rails', '3.2.5'
# Bundle edge Rails instead:
# gem 'rails', :git => 'git://github.com/rails/rails.git'
gem 'sqlite3'
gem 'devise'
# Gems used only for assets and not required
# in production environments by default.
group :assets do
gem 'sass-rails', '~> 3.2.3'
gem 'coffee-rails', '~> 3.2.1'
# See https://github.com/sstephenson/execjs#readme for more supported runtimes
# gem 'therubyracer', :platforms => :ruby
gem 'uglifier', '>= 1.0.3'
end
gem 'jquery-rails'
# To use ActiveModel has_secure_password
# gem 'bcrypt-ruby', '~> 3.0.0'
# To use Jbuilder templates for JSON
# gem 'jbuilder'
# Use unicorn as the app server
# gem 'unicorn'
# Deploy with Capistrano
# gem 'capistrano'
# To use debugger
# gem 'debugger'

Related

RubyMine bundle/bundler configuration error

I am on windows and using RubyMine to develop an app. My 2-year old was found banging on the keyboard when I had stepped away for a sec. She did something to the environment that I can't figure out. I'm getting the following error when I try to run bundle install or bundle update:
C:\RailsInstaller\Ruby1.9.3\bin\ruby.exe -e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift) C:\RailsInstaller\Ruby1.9.3\bin/bundle update
C:/RailsInstaller/Ruby1.9.3/bin/bundle:23:in `load': cannot load such file -- C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/bundler-1.4.0.rc.1/bin/bundle (LoadError)
from C:/RailsInstaller/Ruby1.9.3/bin/bundle:23:in `<top (required)>'
from -e:1:in `load'
from -e:1:in `<main>'
Process finished with exit code 1
My gemfile looks like this:
source 'https://rubygems.org'
gem 'rails', '3.2.11'
# Bundle edge Rails instead:
# gem 'rails', :git => 'git://github.com/rails/rails.git'
gem 'jquery-rails'
gem 'bcrypt-ruby', '~> 3.0.0'
gem 'paperclip'
gem 'wicked' #For handling *.pdf documents, use wicked_pdf
gem 'public_activity'
gem 'thin'
gem 'strong_parameters'
# Gems used only for assets and not required
# in production environments by default.
group :assets do
gem 'sass-rails', '~> 3.2.3'
gem 'coffee-rails', '~> 3.2.1'
# See https://github.com/sstephenson/execjs#readme for more supported runtimes
# gem 'therubyracer', :platforms => :ruby
gem 'uglifier', '>= 1.0.3'
end
group :development, :test do
gem 'rspec-rails'
gem 'sqlite3'
gem 'autotest'
gem 'autotest-rails-pure'
end
group :development do
gem 'annotate'
end
group :production do
gem 'pg'
end
bcrypt-ruby is set to gem 'bcrypt-ruby', '~> 3.0.0' to handle another error (duplicate version load error).
My gem environment is this:
RUBYGEMS VERSION: 1.8.24
RUBY VERSION: 1.9.3 (2013-02-22 patchlevel 392) [i386-mingw32]
INSTALLATION DIRECTORY: C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1
RUBY EXECUTABLE: C:/RailsInstaller/Ruby1.9.3/bin/ruby.exe
EXECUTABLE DIRECTORY: C:/RailsInstaller/Ruby1.9.3/bin
RUBYGEMS PLATFORMS:
ruby
x86-mingw32
GEM PATHS:
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1
C:/Documents and Settings/Me/.gem/ruby/1.9.1
GEM CONFIGURATION:
:update_sources => true
:verbose => true
:benchmark => false
:backtrace => false
:bulk_threshold => 1000
REMOTE SOURCES:
http://rubygems.org/
----------------------
IDE: JetBrains RubyMine 5.4.3.2.1, build #RM-129.861
OS: Windows XP 5.1[x86]
Java: 1.7.0_10-b18
RubyMine SDK Environment:
Sdk: ruby-1.9.3-p392
Sdk Version: ver.1.9.3p392 p392
Ruby Interpreter: C:/RailsInstaller/Ruby1.9.3/bin/ruby.exe
RVM Sdk: no
Sdk Language Level: 1.9
Sdk Load Path:
C:/RailsInstaller/Ruby1.9.3/lib/ruby/site_ruby/1.9.1
C:/RailsInstaller/Ruby1.9.3/lib/ruby/site_ruby/1.9.1/i386-msvcrt
C:/RailsInstaller/Ruby1.9.3/lib/ruby/site_ruby
C:/RailsInstaller/Ruby1.9.3/lib/ruby/vendor_ruby/1.9.1
C:/RailsInstaller/Ruby1.9.3/lib/ruby/vendor_ruby/1.9.1/i386-msvcrt
C:/RailsInstaller/Ruby1.9.3/lib/ruby/vendor_ruby
C:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1
C:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/i386-mingw32
C:/Program Files/RubyMine 5.4.3.2.1/rubystubs193
Sdk Gem paths:
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems
C:/Documents and Settings/Kraig/.gem/ruby/1.9.1/gems
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/bundler/gems
Gems used for 'ballast':
diff-lcs (1.2.4)
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/diff-lcs-1.2.4
rack-test (0.6.2)
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/rack-test-0.6.2
coffee-rails (3.2.2)
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/coffee-rails-3.2.2
erubis (2.7.0)
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/erubis-2.7.0
uglifier (2.2.1)
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/uglifier-2.2.1
actionmailer (3.2.11)
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/actionmailer-3.2.11
pg (0.17.0)
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/pg-0.17.0-x86-mingw32
arel (3.0.2)
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/arel-3.0.2
builder (3.0.4)
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/builder-3.0.4
autotest-rails-pure (4.1.2)
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/autotest-rails-pure-4.1.2
public_activity (1.4.0)
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/public_activity-1.4.0
thin (1.5.1)
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/thin-1.5.1
rails (3.2.11)
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/rails-3.2.11
eventmachine (1.0.3)
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/eventmachine-1.0.3-x86-mingw32
paperclip (3.5.1)
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/paperclip-3.5.1
mail (2.4.4)
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/mail-2.4.4
json (1.8.0)
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/json-1.8.0
daemons (1.1.9)
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/daemons-1.1.9
climate_control (0.0.3)
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/climate_control-0.0.3
activesupport (3.2.11)
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/activesupport-3.2.11
journey (1.0.4)
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/journey-1.0.4
rake (10.1.0)
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/rake-10.1.0
coffee-script (2.2.0)
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/coffee-script-2.2.0
jquery-rails (3.0.4)
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/jquery-rails-3.0.4
rdoc (3.12.2)
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/rdoc-3.12.2
railties (3.2.11)
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/railties-3.2.11
rspec-core (2.14.5)
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/rspec-core-2.14.5
multi_json (1.8.1)
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/multi_json-1.8.1
ZenTest (4.8.3)
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/ZenTest-4.8.3
rspec-mocks (2.14.3)
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/rspec-mocks-2.14.3
execjs (2.0.2)
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/execjs-2.0.2
thor (0.18.1)
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/thor-0.18.1
sprockets (2.2.2)
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/sprockets-2.2.2
wicked (1.0.0)
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/wicked-1.0.0
strong_parameters (0.2.1)
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/strong_parameters-0.2.1
polyglot (0.3.3)
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/polyglot-0.3.3
tilt (1.4.1)
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/tilt-1.4.1
annotate (2.5.0)
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/annotate-2.5.0
activeresource (3.2.11)
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/activeresource-3.2.11
autotest (4.4.6)
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/autotest-4.4.6
bcrypt-ruby (3.1.2)
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/bcrypt-ruby-3.1.2-x86-mingw32
mime-types (1.25)
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/mime-types-1.25
i18n (0.6.5)
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/i18n-0.6.5
activerecord (3.2.11)
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/activerecord-3.2.11
rack-ssl (1.3.3)
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/rack-ssl-1.3.3
rspec-rails (2.14.0)
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/rspec-rails-2.14.0
activemodel (3.2.11)
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/activemodel-3.2.11
sass-rails (3.2.6)
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/sass-rails-3.2.6
rack (1.4.5)
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/rack-1.4.5
treetop (1.4.15)
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/treetop-1.4.15
sass (3.2.12)
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/sass-3.2.12
rack-cache (1.2)
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/rack-cache-1.2
sqlite3 (1.3.8)
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/sqlite3-1.3.8-x86-mingw32
hike (1.2.3)
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/hike-1.2.3
tzinfo (0.3.37)
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/tzinfo-0.3.37
actionpack (3.2.11)
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/actionpack-3.2.11
rspec-expectations (2.14.3)
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/rspec-expectations-2.14.3
coffee-script-source (1.6.3)
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/coffee-script-source-1.6.3
cocaine (0.5.2)
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/cocaine-0.5.2
bundler (1.3.4)
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/bundler-1.3.4
I have tried to manually update the gem in question, revert back to an older version, etc. I can't figure out why the error is occuring. rails s won't work until i get this debugged.
Any ideas?
Does the file C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/bundler-1.4.0.rc.1/bin/bundle exist?
Try uninstalling and then reinstalling the bundler gem.

Deploy ROR to heroku fails due to sqlite3 fails

I've try the method from others post, but still cannot solve it.
I push my file to heroku but it have some error to the sqlite3.
After I install it, it still didn't work.
Below is my code
Counting objects: 82, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (70/70), done.
Writing objects: 100% (82/82), 3.00 MiB | 238 KiB/s, done.
Total 82 (delta 4), reused 0 (delta 0)
-----> Removing .DS_Store files
-----> Ruby/Rails app detected
-----> Installing dependencies using Bundler version 1.3.2
Running: bundle install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin --deployment
Fetching gem metadata from https://rubygems.org/.........
Fetching gem metadata from https://rubygems.org/..
Installing rake (10.0.4)
Installing i18n (0.6.4)
Installing multi_json (1.7.3)
Installing activesupport (3.2.11)
Installing builder (3.0.4)
Installing activemodel (3.2.11)
Installing erubis (2.7.0)
Installing journey (1.0.4)
Installing rack (1.4.5)
Installing rack-cache (1.2)
Installing rack-test (0.6.2)
Installing hike (1.2.2)
Installing tilt (1.4.1)
Installing sprockets (2.2.2)
Installing actionpack (3.2.11)
Installing mime-types (1.23)
Installing polyglot (0.3.3)
Installing treetop (1.4.12)
Installing mail (2.4.4)
Installing actionmailer (3.2.11)
Installing arel (3.0.2)
Installing tzinfo (0.3.37)
Installing activerecord (3.2.11)
Installing activeresource (3.2.11)
Installing coffee-script-source (1.6.2)
Installing execjs (1.4.0)
Installing coffee-script (2.2.0)
Installing rack-ssl (1.3.3)
Installing json (1.8.0)
Installing rdoc (3.12.2)
Installing thor (0.18.1)
Installing railties (3.2.11)
Installing coffee-rails (3.2.2)
Installing jquery-rails (2.2.1)
Using bundler (1.3.2)
Installing rails (3.2.11)
Installing sass (3.2.9)
Installing sass-rails (3.2.6)
Installing sqlite3 (1.3.7)
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
/usr/local/bin/ruby extconf.rb
checking for sqlite3.h... no
sqlite3.h is missing. Try 'port install sqlite3 +universal'
or 'yum install sqlite-devel' and check your shared library search path (the
location where your sqlite3 shared library is located).
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers. Check the mkmf.log file for more
details. You may need configuration options.
Provided configuration options:
--with-opt-dir
--without-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=/usr/local/bin/ruby
--with-sqlite3-dir
--without-sqlite3-dir
--with-sqlite3-include
--without-sqlite3-include=${sqlite3-dir}/include
--with-sqlite3-lib
--without-sqlite3-lib=${sqlite3-dir}/lib
--enable-local
--disable-local
Gem files will remain installed in /tmp/build_2ghtqnawaxqqm/vendor/bundle/ruby/1.9.1/gems/sqlite3-1.3.7 for inspection.
Results logged to /tmp/build_2ghtqnawaxqqm/vendor/bundle/ruby/1.9.1/gems/sqlite3-1.3.7/ext/sqlite3/gem_make.out
An error occurred while installing sqlite3 (1.3.7), and Bundler cannot continue.
Make sure that `gem install sqlite3 -v '1.3.7'` succeeds before bundling.
!
! Failed to install gems via Bundler.
!
! Heroku push rejected, failed to compile Ruby/rails app
To git#heroku.com:peaceful-reef-2102.git
! [remote rejected] master -> master (pre-receive hook declined)
And this is my gemfile:
source 'https://rubygems.org'
gem 'rails', '3.2.11'
# Bundle edge Rails instead:
# gem 'rails', :git => 'git://github.com/rails/rails.git'
gem 'sqlite3'
# Gems used only for assets and not required
# in production environments by default.
group :assets do
gem 'sass-rails', '~> 3.2.3'
gem 'coffee-rails', '~> 3.2.1'
# See https://github.com/sstephenson/execjs#readme for more supported runtimes
# gem 'therubyracer', :platforms => :ruby
gem 'uglifier', '>= 1.0.3'
end
gem 'jquery-rails'
# To use ActiveModel has_secure_password
# gem 'bcrypt-ruby', '~> 3.0.0'
# To use Jbuilder templates for JSON
# gem 'jbuilder'
# Use unicorn as the app server
# gem 'unicorn'
# Deploy with Capistrano
# gem 'capistrano'
# To use debugger
# gem 'debugger'
I don't know what happen, please help me!
Heroku doesn't support sqlite, you need to add pg gem (postgres) and remove sqlite gem

can not load omniauth in rails application

I am following rails 3 in action's source code,when I run the app,I get the following error:
[DEVISE] Devise.use_salt_as_remember_token is deprecated and has no effect. Please remove it.
Could not load 'omniauth'. Please ensure you have the omniauth gem >= 1.0.0 installed and listed in your Gemfile.
Exiting
This is the gem file:
gem 'rails', '3.2.8'
# gem 'arel'
gem 'rack'
gem 'sprockets'
gem 'sqlite3'
gem 'sass', '~> 3.1.0.alpha'
gem 'coffee-script'
gem 'dynamic_form'
gem 'devise'
gem 'cancan'
gem 'paperclip'
gem 'searcher'
gem 'kaminari'
gem 'jquery-rails'
gem "oa-oauth", :require => "omniauth/oauth"
gem "delayed_job"
# gem "forem"
gem "ticketee-forem"
gem 'sinatra'
group :test, :development do
gem 'gmail'
gem 'rspec-rails', '~> 2.6.1.beta1'
end
group :test do
gem 'rack-test'
gem 'cucumber-rails'
gem 'capybara'
gem 'database_cleaner'
gem 'factory_girl'
gem 'email_spec'
gem 'launchy'
end
group :production do
gem 'pg'
end
When I run bundle check it will success.
And my gem list:
*** LOCAL GEMS ***
actionmailer (3.2.8)
actionpack (3.2.8)
activemodel (3.2.8)
activerecord (3.2.8)
activeresource (3.2.8)
activesupport (3.2.8)
addressable (2.2.8)
arel (3.0.2)
bcrypt-ruby (3.0.1)
builder (3.0.2)
bundler (1.1.4)
cancan (1.6.8)
capybara (1.1.2)
childprocess (0.3.5)
cocaine (0.3.0)
coffee-script (2.2.0)
coffee-script-source (1.3.3)
cucumber (1.0.6)
cucumber-rails (1.0.2)
database_cleaner (0.8.0)
delayed_job (3.0.3)
devise (2.1.2)
diff-lcs (1.1.3)
dynamic_form (1.1.4)
email_spec (1.2.1)
erubis (2.7.0)
execjs (1.4.0)
factory_girl (4.0.0)
faraday (0.6.1)
ffi (1.1.5)
gherkin (2.4.21)
gmail (0.4.0)
gmail_xoauth (0.3.2)
hike (1.2.1)
i18n (0.6.1)
journey (1.0.4)
jquery-rails (2.1.2)
json (1.7.5)
kaminari (0.14.0)
launchy (2.1.0)
libwebsocket (0.1.5)
mail (2.4.4)
mime (0.1)
mime-types (1.19)
multi_json (1.3.6)
multipart-post (1.1.5)
mysql2 (0.3.11)
nokogiri (1.4.7)
oa-core (0.2.4)
oa-oauth (0.2.4)
oauth (0.4.7)
oauth2 (0.4.1)
orm_adapter (0.4.0)
paperclip (3.2.0)
pg (0.14.1)
polyglot (0.3.3)
rack (1.4.1)
rack-cache (1.2)
rack-protection (1.2.0)
rack-ssl (1.3.2)
rack-test (0.6.1)
rails (3.2.8)
railties (3.2.8)
rake (0.9.2.2)
rdoc (3.12)
rspec (2.6.0)
rspec-core (2.6.4)
rspec-expectations (2.6.0)
rspec-mocks (2.6.0)
rspec-rails (2.6.1)
rubygems-bundler (1.0.2)
rubyzip (0.9.9)
rvm (1.11.3.3)
sass (3.1.21)
searcher (0.0.6)
selenium-webdriver (2.25.0)
sinatra (1.3.3)
sprockets (2.1.3)
sqlite3 (1.3.6)
term-ansicolor (1.0.7)
thor (0.16.0)
ticketee-forem (0.0.1)
tilt (1.3.3)
treetop (1.4.10)
tzinfo (0.3.33)
warden (1.2.1)
xpath (0.1.4)
As you can see, I do have the gem oa-oauth (0.2.4) installed.
Why does it give me this error?
oa-oauth is not the omniauth gem ... It's the oauth extension for omniauth ... Add the omniauth gem gem 'omniauth', just like the error message tells you ...

rake assets:precompile undefined method `[]' for nil:NilClass

I'm trying to get a new production server up and running and it is so close. When I execute
RAILS_ENV=production rake assets:precompile
This error is returned
undefined method `[]' for nil:NilClass
When I run it with a --trace, this is retuned
$RAILS_ENV=production rake assets:precompile --trace
** Invoke assets:precompile (first_time)
** Execute assets:precompile
rake aborted!
undefined method `[]' for nil:NilClass
(in /home/deploy/pm/app/assets/stylesheets/jquery-ui-1.8.16.custom.css.scss)
Tasks: TOP => assets:precompile
(See full trace by running task with --trace)
I appreciated any help anyone can offer, ideas, etc.
Here is the Gemfile and bundle list
source 'http://rubygems.org'
gem 'cancan'
gem 'client_side_validations'
gem 'devise', '~> 1.5.3'
gem 'execjs'
gem 'haml'
gem 'httparty'
gem 'jquery-rails'
gem 'mysql2'
gem 'paperclip', "~> 2.4"
gem 'rails', '3.1.0'
gem 'rails3-jquery-autocomplete'
gem 'rake', '0.9.2'
gem 'remotipart', "~> 1.0"
gem 'simple_datatables'
gem 'therubyracer'
gem 'validates_timeliness', '~> 3.0.2'
gem 'will_paginate', '~> 3.0'
gem 'geocoder', '~> 1.1.2'
#temp for pm.onlinetherapy.com
gem 'faker'
group :test do
gem 'capybara'
gem 'cucumber-rails', :require => false
gem 'database_cleaner'
gem 'factory_girl_rails'
gem 'faker'
gem 'guard-rspec'
gem 'selenium-webdriver', '2.7.0'
gem 'webrat'
end
group :development, :test do
gem 'faker'
gem 'haml-rails'
gem 'hpricot'
gem 'rspec-rails'
gem 'ruby_parser'
gem 'web-app-theme', '~> 0.8.0'
end
# Gems used only for assets and not required
# in production environments by default.
group :assets do
gem 'sprockets'
gem 'sass', '3.1.20'
gem 'sass-rails', '3.1.4' # downgraded to 3.1.4 to avoid a stack overflow error in rake assets:precompile
gem 'coffee-rails', "~> 3.1.0"
gem 'uglifier'
end
# Use unicorn as the web server
# gem 'unicorn'
# Deploy with Capistrano
# gem 'capistrano'
# To use debugger
# bundle install has a problem installing linecache19, a dependency of ruby-debug19
# try 'sudo gem install linecache19' to fix the problem, and then do bundle install again
gem 'ruby-debug19', :require => 'ruby-debug'
And the bundle list gives
Gems included by the bundle:
* actionmailer (3.1.0)
* actionpack (3.1.0)
* activemodel (3.1.0)
* activerecord (3.1.0)
* activeresource (3.1.0)
* activesupport (3.1.0)
* archive-tar-minitar (0.5.2)
* arel (2.2.3)
* bcrypt-ruby (3.0.1)
* builder (3.0.2)
* bundler (1.2.0)
* cancan (1.6.8)
* capybara (1.1.2)
* childprocess (0.3.5)
* client_side_validations (3.1.4)
* cocaine (0.3.0)
* coffee-rails (3.1.1)
* coffee-script (2.2.0)
* coffee-script-source (1.3.3)
* columnize (0.3.6)
* cucumber (1.2.1)
* cucumber-rails (1.3.0)
* database_cleaner (0.8.0)
* devise (1.5.3)
* diff-lcs (1.1.3)
* erubis (2.7.0)
* execjs (1.4.0)
* factory_girl (4.0.0)
* factory_girl_rails (4.0.0)
* faker (1.0.1)
* ffi (1.1.5)
* geocoder (1.1.3)
* gherkin (2.11.2)
* guard (1.3.2)
* guard-rspec (1.2.1)
* haml (3.1.7)
* haml-rails (0.3.4)
* hike (1.2.1)
* hpricot (0.8.6)
* httparty (0.8.3)
* i18n (0.6.1)
* jquery-rails (2.1.2)
* json (1.7.5)
* json_pure (1.7.5)
* jsonify (0.3.1)
* jsonify-rails (0.3.2)
* libv8 (3.3.10.4)
* linecache19 (0.5.12)
* listen (0.5.0)
* mail (2.3.3)
* meta_search (1.1.3)
* mime-types (1.19)
* multi_json (1.3.6)
* multi_xml (0.5.1)
* mysql2 (0.3.11)
* nokogiri (1.5.5)
* orm_adapter (0.0.7)
* paperclip (2.7.0)
* polyamorous (0.5.0)
* polyglot (0.3.3)
* rack (1.3.6)
* rack-cache (1.0.3)
* rack-mount (0.8.3)
* rack-ssl (1.3.2)
* rack-test (0.6.1)
* rails (3.1.0)
* rails3-jquery-autocomplete (1.0.9)
* railties (3.1.0)
* rake (0.9.2)
* rdoc (3.12)
* remotipart (1.0.2)
* rspec (2.11.0)
* rspec-core (2.11.1)
* rspec-expectations (2.11.3)
* rspec-mocks (2.11.2)
* rspec-rails (2.11.0)
* ruby-debug-base19 (0.11.25)
* ruby-debug19 (0.11.6)
* ruby_core_source (0.1.5)
* ruby_parser (2.3.1)
* rubyzip (0.9.9)
* sass (3.1.20)
* sass-rails (3.1.4)
* selenium-webdriver (2.7.0)
* sexp_processor (3.2.0)
* simple_datatables (0.2.1)
* sprockets (2.0.4)
* therubyracer (0.10.2)
* thor (0.14.6)
* tilt (1.3.3)
* timeliness (0.3.6)
* treetop (1.4.10)
* tzinfo (0.3.33)
* uglifier (1.3.0)
* validates_timeliness (3.0.14)
* warden (1.2.1)
* web-app-theme (0.8.0)
* webrat (0.7.3)
* will_paginate (3.0.3)
* xpath (0.1.4)
In my case the error appeared after I created a file in apps/assets/stylesheet/fonts.css
This file had a call to font-url() like:
#font-face {
font-family: 'museo-slab';
src: font-url('museo_slab_500-webfont.eot');
src: font-url('museo_slab_500-webfont.eot?#iefix') format('embedded-opentype'),
font-url('museo_slab_500-webfont.ttf') format('truetype');
font-weight: bold;
font-style: normal;
}
When I renamed this file to font.scss the error undefined method '[]' for nil:NilClass just dissapeared
I had a similar problem as Cristiam. I'm using Rails 4.0 and I had a call to image-url() in a .css file.
#pullrefresh .icon.loading {
background: image-url('spinner.png') no-repeat;
width: 19px;
height: 19px;
background-size: 100%;
bottom: 0;
animation: rotate 1s linear infinite;
-o-animation: rotate 1s linear infinite;
-ms-animation: rotate 1s linear infinite;
-moz-animation: rotate 1s linear infinite;
-webkit-animation: rotate 1s linear infinite;
}
I just had to rename the file to <filename>.scss and it worked fine for me, too.
I using Rails 4.2.8 and i fix this issue with this way:
Find in all project with key: asset-url.
If have any file css has this, please change it to scss.
Commit -> Deploy. It working.
I think this may have broken once I'd upgraded to Rails 3.2.16. I just needed to update the sass-rails gem to fix this.
bundle update sass-rails
I got the same issue and I resolve this by:
renaming the .css file with contains SCSS variables or pattern like # eg. #font-face to .scss
removing .css.map files (if there any)
removing the file generated by .css.map
Hope this will help to save your precious time debugging assets precompilation issues related to the stylesheet.
I realize this is an old thread, but it is the top result for my search query.
on rails ~6.0, using Encrypted Secrets (Credentials), deploying to Heroku, but this would apply anywhere you don't have the master.key file checked in (which should be everywhere!)
in my case, I decided to use environment variables to provide the master.key, and had forgotten to set the variable RAILS_MASTER_KEY.
I got here from doing a sed replacement on my branch. Although I was excluding many sensitive folders, I think the replacement somehow corrupted my assets. Removing them and re-compiling did not solve the issue. After trying everything in this thread, I eventually had to resort to re-cloning the branch and copying my .git folder to the new folder. So if all else fails, try re-cloning your branch.

Is the slug size normal?

I just started using Rails 3 on Heroku and was surprised at how much bigger the slug size (28MB) is compared to using Rails 2.3.5 on Heroku (less than 5MB). Is this normal? It's a simple application that only uses the reque, aasm, and unicorn gems. Everything else is the default.
source 'http://rubygems.org'
gem 'rails', '3.1.0.rc4'
gem 'pg'
# Asset template engines
gem 'sass-rails', "~> 3.1.0.rc"
gem 'coffee-script'
gem 'uglifier'
gem 'jquery-rails'
gem 'aasm'
gem 'resque'
# Use unicorn as the web server
gem 'unicorn'
group :production do
gem 'therubyracer-heroku', '0.8.1.pre3'
end
-----> Heroku receiving push
-----> Ruby/Rails app detected
-----> Installing dependencies using Bundler version 1.1.pre.5
Running: bundle install --without development:test --path vendor/bundle --deployment
Using rake (0.9.2)
Using aasm (2.2.0)
Using multi_json (1.0.3)
Using activesupport (3.1.0.rc4)
Using bcrypt-ruby (2.1.4)
Using builder (3.0.0)
Using i18n (0.6.0)
Using activemodel (3.1.0.rc4)
Using erubis (2.7.0)
Using rack (1.3.0)
Using rack-cache (1.0.2)
Using rack-mount (0.8.1)
Using rack-test (0.6.0)
Using hike (1.1.0)
Using tilt (1.3.2)
Using sprockets (2.0.0.beta.10)
Using tzinfo (0.3.29)
Using actionpack (3.1.0.rc4)
Using mime-types (1.16)
Using polyglot (0.3.1)
Using treetop (1.4.9)
Using mail (2.3.0)
Using actionmailer (3.1.0.rc4)
Using arel (2.1.3)
Using activerecord (3.1.0.rc4)
Using activeresource (3.1.0.rc4)
Using coffee-script-source (1.1.1)
Using execjs (1.2.0)
Using coffee-script (2.2.0)
Using rack-ssl (1.3.2)
Using rdoc (3.8)
Using thor (0.14.6)
Using railties (3.1.0.rc4)
Using jquery-rails (1.0.12)
Using json (1.5.3)
Using kgio (2.5.0)
Using pg (0.11.0)
Using bundler (1.1.pre.5)
Using rails (3.1.0.rc4)
Using raindrops (0.7.0)
Using redis (2.2.1)
Using redis-namespace (1.0.3)
Using sinatra (1.2.6)
Using vegas (0.1.8)
Using resque (1.17.1)
Using sass (3.1.4)
Using sass-rails (3.1.0.rc.4)
Using therubyracer-heroku (0.8.1.pre3)
Using uglifier (1.0.0)
Using unicorn (4.0.1)
Your bundle is complete! It was installed into ./vendor/bundle
Cleaning up the bundler cache.
-----> Creating ERB based database.yml
-----> Rails plugin injection
Injecting rails_log_stdout
Injecting rails3_serve_static_assets
-----> Preparing app for Rails asset pipeline
-----> Discovering process types
Procfile declares types -> web, worker
Default types for Ruby/Rails -> console, rake
-----> Compiled slug size is 28.3MB
-----> Launching... done, v59
yes, it's perfectly fine. Especially since it's Rails 3.1 since it has dependency on a few large gems like rubyracer etc.