Heroku error when running heroku rake db:migrate - ruby-on-rails

When I try to run
heroku rake db:migrate
I get the following error:
rake aborted!
Please install the postgresql adapter: gem install activerecord-postgresql-adapter (pg is not part of the bundle. Add it to Gemfile.)
Tasks: TOP => db:migrate => db:load_config
(See full trace by running task with --trace)
Here's what my Gemfile looks like:
group :production do
gem 'pg'
end
group :development, :test do
gem 'turn', '0.8.2', :require => false
gem 'sqlite3', '1.3.5'
end
So I added the 'pg' to the Gemfile but it still complains. I'm a bit in dispair because I don't know what to do next..?
UPDATE
The command heroku run rake db:migrate leads to the same error.
Here's my Gemfile:
source 'http://rubygems.org'
gem 'rails', '3.1.3'
group :production do
gem 'pg', '0.12.0'
end
group :development, :test do
# Pretty printed test output
gem 'turn', '0.8.2', :require => false
gem 'sqlite3', '1.3.5'
end
# Bundle edge Rails instead:
# gem 'rails', :git => 'git://github.com/rails/rails.git'
# Gems used only for assets and not required
# in production environments by default.
group :assets do
gem 'sass-rails', '~> 3.1.5'
gem 'coffee-rails', '~> 3.1.1'
gem 'uglifier', '>= 1.0.3'
end
gem 'jquery-rails'
# To use ActiveModel has_secure_password
# gem 'bcrypt-ruby', '~> 3.0.0'
# Use unicorn as the web server
# gem 'unicorn'
# Deploy with Capistrano
# gem 'capistrano'
# To use debugger
# gem 'ruby-debug19', :require => 'ruby-debug'
Thank you so much for your help!
UPDATE 2
Here's my Gemfile.lock:
GEM
remote: http://rubygems.org/
specs:
actionmailer (3.1.3)
actionpack (= 3.1.3)
mail (~> 2.3.0)
actionpack (3.1.3)
activemodel (= 3.1.3)
activesupport (= 3.1.3)
builder (~> 3.0.0)
erubis (~> 2.7.0)
i18n (~> 0.6)
rack (~> 1.3.5)
rack-cache (~> 1.1)
rack-mount (~> 0.8.2)
rack-test (~> 0.6.1)
sprockets (~> 2.0.3)
activemodel (3.1.3)
activesupport (= 3.1.3)
builder (~> 3.0.0)
i18n (~> 0.6)
activerecord (3.1.3)
activemodel (= 3.1.3)
activesupport (= 3.1.3)
arel (~> 2.2.1)
tzinfo (~> 0.3.29)
activeresource (3.1.3)
activemodel (= 3.1.3)
activesupport (= 3.1.3)
activesupport (3.1.3)
multi_json (~> 1.0)
ansi (1.4.1)
arel (2.2.1)
builder (3.0.0)
coffee-rails (3.1.1)
coffee-script (>= 2.2.0)
railties (~> 3.1.0)
coffee-script (2.2.0)
coffee-script-source
execjs
coffee-script-source (1.1.3)
erubis (2.7.0)
execjs (1.2.12)
multi_json (~> 1.0)
hike (1.2.1)
i18n (0.6.0)
jquery-rails (1.0.19)
railties (~> 3.0)
thor (~> 0.14)
json (1.6.3)
mail (2.3.0)
i18n (>= 0.4.0)
mime-types (~> 1.16)
treetop (~> 1.4.8)
mime-types (1.17.2)
multi_json (1.0.4)
pg (0.12.0)
rake-compiler (~> 0.7)
polyglot (0.3.3)
rack (1.3.5)
rack-cache (1.1)
rack (>= 0.4)
rack-mount (0.8.3)
rack (>= 1.0.0)
rack-ssl (1.3.2)
rack
rack-test (0.6.1)
rack (>= 1.0)
rails (3.1.3)
actionmailer (= 3.1.3)
actionpack (= 3.1.3)
activerecord (= 3.1.3)
activeresource (= 3.1.3)
activesupport (= 3.1.3)
bundler (~> 1.0)
railties (= 3.1.3)
railties (3.1.3)
actionpack (= 3.1.3)
activesupport (= 3.1.3)
rack-ssl (~> 1.3.2)
rake (>= 0.8.7)
rdoc (~> 3.4)
thor (~> 0.14.6)
rake (0.9.2.2)
rake-compiler (0.7.9)
rake
rdoc (3.12)
json (~> 1.4)
sass (3.1.12)
sass-rails (3.1.5)
actionpack (~> 3.1.0)
railties (~> 3.1.0)
sass (~> 3.1.10)
tilt (~> 1.3.2)
sprockets (2.0.3)
hike (~> 1.2)
rack (~> 1.0)
tilt (~> 1.1, != 1.3.0)
sqlite3 (1.3.5)
thor (0.14.6)
tilt (1.3.3)
treetop (1.4.10)
polyglot
polyglot (>= 0.3.1)
turn (0.8.2)
ansi (>= 1.2.2)
tzinfo (0.3.31)
uglifier (1.2.0)
execjs (>= 0.3.0)
multi_json (>= 1.0.2)
PLATFORMS
ruby
DEPENDENCIES
coffee-rails (~> 3.1.1)
jquery-rails
pg (= 0.12.0)
rails (= 3.1.3)
sass-rails (~> 3.1.5)
sqlite3 (= 1.3.5)
turn (= 0.8.2)
uglifier (>= 1.0.3)

If you are on Cedar you need to run heroku run rake db:migrate although that does not sound like the case. If you are running rails 3 or > you should be using the cedar stack though.
You could also try adding gem 'pg', " ~> 0.12.0" to your gem file and run bundler again (bundle install) that should get pg to your Gemfile.lock (look for something like:pg (0.12.0))
If that does not work can tell us your environment and maybe paste the heroku --trace log?

try adding this to your gemfile
gem 'therubyracer'
bundle it, and then run all necessary commands.

Related

Error: Could not find activemodel-3.2.13 in any of source

I have a problem with launching of the ready project.
When i launch the program with:
rails s
I get:
Could not find activemodel-3.2.13 in any of sources
Run 'bundle install' to install missing gems
After running:
bundle install
I have:
Installing mysql2 0.3.16 with native extensions
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
e:/Different/RoR/Ruby22/bin/ruby.exe extconf.rb
* 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.
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
Gem files will remain installed in e:/Different/RoR/Ruby22/lib/ruby/gems/2.2.0/gems/debugger-1.6.8 for inspection.
Results logged to e:/Different/RoR/Ruby22/lib/ruby/gems/2.2.0/gems/debugger-1.6.8/ext/ruby_debug/gem_make.out
An error occurred while installing mysql2 (0.3.16), and Bundler cannot continue.
Make sure that gem install mysql2 -v '0.3.16' succeeds before bundling.
Thats not all log, just with errors.
So next i run:
gem install mysql2 -v '0.3.16'
I get:
ERROR: Error installing mysql2:
ERROR: Failed to build gem native extension.
* 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.
Gem files will remain installed in E:/Different/RoR/Ruby22/lib/ruby/gems/2.2.0/gems/mysql2-0.3.16 for inspection.
Results logged to E:/Different/RoR/Ruby22/lib/ruby/gems/2.2.0/gems/mysql2-0.3.16/ext/mysql2/gem_make.out
So what should i do?
Earlier I have one more error connected with SSL connection error. So I couldnt load from http://rubygems.org/. But it seems like its gone now.
My GemFile:
source 'https://rubygems.org'
gem 'rails', '3.2.13'
# Bundle edge Rails instead:
# gem 'rails', :git => 'git://github.com/rails/rails.git'
gem 'rake', '10.2.1'
# gem 'sqlite3'
gem 'mysql2'
gem 'haml-rails'
gem 'annotate', '>=2.6.0'
gem 'bcrypt-ruby', '3.0.1'
gem "date-input-rails"
gem "nested_form"
gem 'debugger'
#gem "thin"
# 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'
gem 'bootstrap-sass', '3.0'
gem 'bootstrap-datepicker-rails'
# 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'
My GemFile.lock:
GEM
remote: https://rubygems.org/
specs:
actionmailer (3.2.13)
actionpack (= 3.2.13)
mail (~> 2.5.3)
actionpack (3.2.13)
activemodel (= 3.2.13)
activesupport (= 3.2.13)
builder (~> 3.0.0)
erubis (~> 2.7.0)
journey (~> 1.0.4)
rack (~> 1.4.5)
rack-cache (~> 1.2)
rack-test (~> 0.6.1)
sprockets (~> 2.2.1)
activemodel (3.2.13)
activesupport (= 3.2.13)
builder (~> 3.0.0)
activerecord (3.2.13)
activemodel (= 3.2.13)
activesupport (= 3.2.13)
arel (~> 3.0.2)
tzinfo (~> 0.3.29)
activeresource (3.2.13)
activemodel (= 3.2.13)
activesupport (= 3.2.13)
activesupport (3.2.13)
i18n (= 0.6.1)
multi_json (~> 1.0)
annotate (2.6.1)
activerecord (>= 2.3.0)
rake (>= 0.8.7)
arel (3.0.3)
bcrypt-ruby (3.0.1)
bootstrap-datepicker-rails (1.3.0.1)
railties (>= 3.0)
bootstrap-sass (3.0.0.0)
sass (~> 3.2)
builder (3.0.4)
coffee-rails (3.2.2)
coffee-script (>= 2.2.0)
railties (~> 3.2.0)
coffee-script (2.2.0)
coffee-script-source
execjs
coffee-script-source (1.7.0)
columnize (0.9.0)
date-input-rails (0.0.3)
jquery-ui-rails
rails (~> 3.2.8)
debugger (1.6.8)
columnize (>= 0.3.1)
debugger-linecache (~> 1.2.0)
debugger-ruby_core_source (~> 1.3.5)
debugger-linecache (1.2.0)
debugger-ruby_core_source (1.3.7)
erubis (2.7.0)
execjs (2.0.2)
haml (4.0.5)
tilt
haml-rails (0.4)
actionpack (>= 3.1, < 4.1)
activesupport (>= 3.1, < 4.1)
haml (>= 3.1, < 4.1)
railties (>= 3.1, < 4.1)
hike (1.2.3)
i18n (0.6.1)
journey (1.0.4)
jquery-rails (3.1.0)
railties (>= 3.0, < 5.0)
thor (>= 0.14, < 2.0)
jquery-ui-rails (4.1.2)
railties (>= 3.1.0)
json (1.8.1)
mail (2.5.4)
mime-types (~> 1.16)
treetop (~> 1.4.8)
mime-types (1.25.1)
multi_json (1.8.4)
mysql2 (0.3.16)
nested_form (0.3.2)
polyglot (0.3.3)
rack (1.4.5)
rack-cache (1.2)
rack (>= 0.4)
rack-ssl (1.3.3)
rack
rack-test (0.6.2)
rack (>= 1.0)
rails (3.2.13)
actionmailer (= 3.2.13)
actionpack (= 3.2.13)
activerecord (= 3.2.13)
activeresource (= 3.2.13)
activesupport (= 3.2.13)
bundler (~> 1.0)
railties (= 3.2.13)
railties (3.2.13)
actionpack (= 3.2.13)
activesupport (= 3.2.13)
rack-ssl (~> 1.3.2)
rake (>= 0.8.7)
rdoc (~> 3.4)
thor (>= 0.14.6, < 2.0)
rake (10.2.1)
rdoc (3.12.2)
json (~> 1.4)
sass (3.2.14)
sass-rails (3.2.6)
railties (~> 3.2.0)
sass (>= 3.1.10)
tilt (~> 1.3)
sprockets (2.2.2)
hike (~> 1.2)
multi_json (~> 1.0)
rack (~> 1.0)
tilt (~> 1.1, != 1.3.0)
thor (0.18.1)
tilt (1.4.1)
treetop (1.4.15)
polyglot
polyglot (>= 0.3.1)
tzinfo (0.3.38)
uglifier (2.4.0)
execjs (>= 0.3.0)
json (>= 1.8.0)
PLATFORMS
ruby
DEPENDENCIES
annotate (>= 2.6.0)
bcrypt-ruby (= 3.0.1)
bootstrap-datepicker-rails
bootstrap-sass (= 3.0)
coffee-rails (~> 3.2.1)
date-input-rails
debugger
haml-rails
jquery-rails
mysql2
nested_form
rails (= 3.2.13)
rake (= 10.2.1)
sass-rails (~> 3.2.3)
uglifier (>= 1.0.3)
I followed this guideline https://medium.com/#frontlineutils/installing-the-mysql2-rubyonrails-gem-on-windows-7-8-a028f44d87f3#.op5rwsf2e
As I'm no more on windows, I can't test it again, but it should still work.

rake assets:precompile, Command failed with status (137):

I am trying to precompile assets using assets:precompile command but i am getting below error.
** Invoke assets:precompile (first_time)
** Execute assets:precompile /root/jruby-1.7.9/bin/jruby /root/jruby-1.7.9/bin/rake assets:precompile:all RAILS_ENV=production
RAILS_GROUPS=assets --trace
** Invoke assets:precompile:all (first_time)
** Invoke assets:cache:clean (first_time)
** Invoke assets:environment (first_time)
** Execute assets:environment
** Invoke environment (first_time)
** Execute environment
** Execute assets:cache:clean
** Execute assets:precompile:all rake aborted! Command failed with status (137): [/root/jruby-1.7.9/bin/jruby /root/jruby-1....]
/root/jruby-1.7.9/lib/ruby/gems/shared/gems/rake-10.1.1/lib/rake/file_utils.rb:55:in create_shell_runner' org/jruby/RubyProc.java:271:incall'
/root/jruby-1.7.9/lib/ruby/gems/shared/gems/rake-10.1.1/lib/rake/file_utils.rb:45:in sh'
/root/jruby-1.7.9/lib/ruby/gems/shared/gems/rake-10.1.1/lib/rake/file_utils_ext.rb:41:in
sh'
/root/jruby-1.7.9/lib/ruby/gems/shared/gems/rake-10.1.1/lib/rake/file_utils.rb:82:in ruby'
/root/jruby-1.7.9/lib/ruby/gems/shared/gems/rake-10.1.1/lib/rake/file_utils_ext.rb:41:in
ruby'
/root/jruby-1.7.9/lib/ruby/gems/shared/gems/turbo-sprockets-rails3-0.3.11/lib/turbo-sprockets/tasks/assets.rake:24:in
ruby_rake_task'
/root/jruby-1.7.9/lib/ruby/gems/shared/gems/turbo-sprockets-rails3-0.3.11/lib/turbo-sprockets/tasks/assets.rake:33:in
invoke_or_reboot_rake_task'
/root/jruby-1.7.9/lib/ruby/gems/shared/gems/turbo-sprockets-rails3-0.3.11/lib/turbo-sprockets/tasks/assets.rake:50:in
(root)' org/jruby/RubyProc.java:271:incall'
/root/jruby-1.7.9/lib/ruby/gems/shared/gems/rake-10.1.1/lib/rake/task.rb:236:in
execute' org/jruby/RubyArray.java:1613:ineach'
/root/jruby-1.7.9/lib/ruby/gems/shared/gems/rake-10.1.1/lib/rake/task.rb:231:in
execute'
/root/jruby-1.7.9/lib/ruby/gems/shared/gems/rake-10.1.1/lib/rake/task.rb:175:in
invoke_with_call_chain'
/root/jruby-1.7.9/lib/ruby/1.9/monitor.rb:211:in mon_synchronize'
/root/jruby-1.7.9/lib/ruby/gems/shared/gems/rake-10.1.1/lib/rake/task.rb:168:in
invoke_with_call_chain'
/root/jruby-1.7.9/lib/ruby/gems/shared/gems/rake-10.1.1/lib/rake/task.rb:161:in
invoke'
/root/jruby-1.7.9/lib/ruby/gems/shared/gems/rake-10.1.1/lib/rake/application.rb:149:in
invoke_task'
/root/jruby-1.7.9/lib/ruby/gems/shared/gems/rake-10.1.1/lib/rake/application.rb:106:in
top_level' org/jruby/RubyArray.java:1613:ineach'
/root/jruby-1.7.9/lib/ruby/gems/shared/gems/rake-10.1.1/lib/rake/application.rb:106:in
top_level'
/root/jruby-1.7.9/lib/ruby/gems/shared/gems/rake-10.1.1/lib/rake/application.rb:115:in
run_with_threads'
/root/jruby-1.7.9/lib/ruby/gems/shared/gems/rake-10.1.1/lib/rake/application.rb:100:in
top_level'
/root/jruby-1.7.9/lib/ruby/gems/shared/gems/rake-10.1.1/lib/rake/application.rb:78:in
run'
/root/jruby-1.7.9/lib/ruby/gems/shared/gems/rake-10.1.1/lib/rake/application.rb:165:in
standard_exception_handling'
/root/jruby-1.7.9/lib/ruby/gems/shared/gems/rake-10.1.1/lib/rake/application.rb:75:in
run'
/root/jruby-1.7.9/lib/ruby/gems/shared/gems/rake-10.1.1/bin/rake:33:in
(root)' org/jruby/RubyKernel.java:1099:inload'
/root/jruby-1.7.9/bin/rake:23:in `(root)' Tasks: TOP =>
assets:precompile
My gem file is as below
source 'https://rubygems.org'
gem 'rails', '3.2.14'
# Bundle edge Rails instead:
# gem 'rails', :git => 'git://github.com/rails/rails.git'
#gem 'mysql2'
gem 'activerecord-jdbcmysql-adapter', '~> 1.3.0'
gem 'jruby-openssl'
# Gems used only for assets and not required
# in production environments by default.
gem 'sass-rails', '~> 3.2.3'
gem 'coffee-rails', '~> 3.2.1'
gem 'bootstrap-sass', '~> 3.0.2.0'
# See https://github.com/sstephenson/execjs#readme for more supported runtimes
gem 'therubyrhino'
# gem 'therubyracer'
gem 'uglifier', '>= 1.0.3'
gem 'turbo-sprockets-rails3'
gem 'jquery-rails'
gem 'devise', '3.2.2'
gem 'simple_form'
gem 'jquery-datatables-rails', '~> 2.2.3'
gem "instagram", "~> 0.10.0"
gem 'whenever', :require => false
gem 'rack-cache', :require => 'rack/cache'
gem "dragonfly", '~>0.9.15'
gem 'delayed_job_active_record'
gem 'daemons'
gem "lazyload-rails"
gem "spreadsheet"
gem 'newrelic_rpm'
# gem "ruby-mcrypt"
gem "koala","~> 2.0"
group :development, :test do
gem 'hirb'
gem 'pry'
gem 'awesome_print', '~> 1.6.1'
# gem 'better_errors', '~> 1.1.0'
# gem 'binding_of_caller'
end
# 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'
My Gemfile.lock is as below
GEM
remote: https://rubygems.org/
specs:
actionmailer (3.2.14)
actionpack (= 3.2.14)
mail (~> 2.5.4)
actionpack (3.2.14)
activemodel (= 3.2.14)
activesupport (= 3.2.14)
builder (~> 3.0.0)
erubis (~> 2.7.0)
journey (~> 1.0.4)
rack (~> 1.4.5)
rack-cache (~> 1.2)
rack-test (~> 0.6.1)
sprockets (~> 2.2.1)
activemodel (3.2.14)
activesupport (= 3.2.14)
builder (~> 3.0.0)
activerecord (3.2.14)
activemodel (= 3.2.14)
activesupport (= 3.2.14)
arel (~> 3.0.2)
tzinfo (~> 0.3.29)
activerecord-jdbc-adapter (1.3.5)
activerecord (>= 2.2)
activerecord-jdbcmysql-adapter (1.3.5)
activerecord-jdbc-adapter (~> 1.3.5)
jdbc-mysql (>= 5.1.22)
activeresource (3.2.14)
activemodel (= 3.2.14)
activesupport (= 3.2.14)
activesupport (3.2.14)
i18n (~> 0.6, >= 0.6.4)
multi_json (~> 1.0)
addressable (2.3.8)
arel (3.0.3)
atomic (1.1.14)
atomic (1.1.14-java)
awesome_print (1.6.1)
bcrypt-ruby (3.1.2)
bcrypt-ruby (3.1.2-java)
bootstrap-sass (3.0.2.1)
sass (~> 3.2)
bouncy-castle-java (1.5.0147)
builder (3.0.4)
chronic (0.10.2)
coderay (1.1.0)
coffee-rails (3.2.2)
coffee-script (>= 2.2.0)
railties (~> 3.2.0)
coffee-script (2.2.0)
coffee-script-source
execjs
coffee-script-source (1.6.3)
daemons (1.1.9)
delayed_job (4.0.0)
activesupport (>= 3.0, < 4.1)
delayed_job_active_record (4.0.0)
activerecord (>= 3.0, < 4.1)
delayed_job (>= 3.0, < 4.1)
devise (3.2.2)
bcrypt-ruby (~> 3.0)
orm_adapter (~> 0.1)
railties (>= 3.2.6, < 5)
thread_safe (~> 0.1)
warden (~> 1.2.3)
dragonfly (0.9.15)
multi_json (~> 1.0)
rack
erubis (2.7.0)
execjs (2.0.2)
faraday (0.8.9)
multipart-post (~> 1.2.0)
faraday_middleware (0.9.0)
faraday (>= 0.7.4, < 0.9)
ffi (1.9.8-java)
hashie (2.0.5)
hike (1.2.3)
hirb (0.7.3)
i18n (0.6.9)
instagram (0.10.0)
faraday (>= 0.7, < 0.9)
faraday_middleware (~> 0.8)
hashie (>= 0.4.0)
multi_json (~> 1.0, >= 1.0.3)
jdbc-mysql (5.1.28)
journey (1.0.4)
jquery-datatables-rails (2.2.3)
jquery-rails
sass-rails
jquery-rails (3.0.4)
railties (>= 3.0, < 5.0)
thor (>= 0.14, < 2.0)
jruby-openssl (0.9.4)
bouncy-castle-java (>= 1.5.0147)
json (1.8.1)
json (1.8.1-java)
koala (2.0.0)
addressable
faraday
multi_json
lazyload-rails (0.2.0)
nokogiri (~> 1.5)
mail (2.5.4)
mime-types (~> 1.16)
treetop (~> 1.4.8)
method_source (0.8.2)
mime-types (1.25.1)
mini_portile (0.5.2)
multi_json (1.8.4)
multipart-post (1.2.0)
newrelic_rpm (3.9.9.275)
nokogiri (1.6.1)
mini_portile (~> 0.5.0)
nokogiri (1.6.1-java)
mini_portile (~> 0.5.0)
orm_adapter (0.5.0)
polyglot (0.3.3)
pry (0.10.1-java)
coderay (~> 1.1.0)
method_source (~> 0.8.1)
slop (~> 3.4)
spoon (~> 0.0)
rack (1.4.5)
rack-cache (1.2)
rack (>= 0.4)
rack-ssl (1.3.3)
rack
rack-test (0.6.2)
rack (>= 1.0)
rails (3.2.14)
actionmailer (= 3.2.14)
actionpack (= 3.2.14)
activerecord (= 3.2.14)
activeresource (= 3.2.14)
activesupport (= 3.2.14)
bundler (~> 1.0)
railties (= 3.2.14)
railties (3.2.14)
actionpack (= 3.2.14)
activesupport (= 3.2.14)
rack-ssl (~> 1.3.2)
rake (>= 0.8.7)
rdoc (~> 3.4)
thor (>= 0.14.6, < 2.0)
rake (10.1.1)
rdoc (3.12.2)
json (~> 1.4)
ruby-ole (1.2.11.7)
sass (3.2.13)
sass-rails (3.2.6)
railties (~> 3.2.0)
sass (>= 3.1.10)
tilt (~> 1.3)
simple_form (2.1.1)
actionpack (~> 3.0)
activemodel (~> 3.0)
slop (3.6.0)
spoon (0.0.4)
ffi
spreadsheet (0.9.7)
ruby-ole (>= 1.0)
sprockets (2.2.2)
hike (~> 1.2)
multi_json (~> 1.0)
rack (~> 1.0)
tilt (~> 1.1, != 1.3.0)
therubyrhino (2.0.2)
therubyrhino_jar (>= 1.7.3)
therubyrhino_jar (1.7.4)
thor (0.18.1)
thread_safe (0.1.3)
atomic
thread_safe (0.1.3-java)
atomic
tilt (1.4.1)
treetop (1.4.15)
polyglot
polyglot (>= 0.3.1)
turbo-sprockets-rails3 (0.3.11)
railties (> 3.2.8, < 4.0.0)
sprockets (>= 2.2.0)
tzinfo (0.3.38)
uglifier (2.4.0)
execjs (>= 0.3.0)
json (>= 1.8.0)
warden (1.2.3)
rack (>= 1.0)
whenever (0.8.4)
activesupport (>= 2.3.4)
chronic (>= 0.6.3)
PLATFORMS
java
DEPENDENCIES
activerecord-jdbcmysql-adapter (~> 1.3.0)
awesome_print (~> 1.6.1)
bootstrap-sass (~> 3.0.2.0)
coffee-rails (~> 3.2.1)
daemons
delayed_job_active_record
devise (= 3.2.2)
dragonfly (~> 0.9.15)
hirb
instagram (~> 0.10.0)
jquery-datatables-rails (~> 2.2.3)
jquery-rails
jruby-openssl
koala (~> 2.0)
lazyload-rails
newrelic_rpm
pry
rack-cache
rails (= 3.2.14)
sass-rails (~> 3.2.3)
simple_form
spreadsheet
therubyrhino
turbo-sprockets-rails3
uglifier (>= 1.0.3)
whenever
Please someone help me, i am getting the error from inside the gem, i could not able to get what is status (137). I searched in internet i could not able to find any error with status (137). please help me out.
if got any error in precompile of assets then firstly try to run this command
rake assets:clobber
then precompile the assests

RSpec running error

Doing my first RSpec test and getting an error when I run:
rspec spec/features/list_movies_spec.rb
error message:
/Users/waymond/.rvm/gems/ruby-2.0.0-p247/gems/bundler-1.5.1/lib/bundler/runtime.rb:34:in block in setup': You have already activated rspec-core 2.14.7, but your Gemfile requires rspec-core 2.13.1. Prependingbundle exec` to your command may solve this. (Gem::LoadError)
In my Gemfile.lock, I noticed that there were 2 rspec-core's in there and one was 2.13.0, which might be the problem. Any help on how to go about fixing this is much appreciated. Thank you! Here is my Gemfile:
source 'https://rubygems.org'
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '4.0.2'
# Use sqlite3 as the database for Active Record
gem 'sqlite3'
# Use SCSS for stylesheets
gem 'sass-rails', '~> 4.0.0'
# Use Uglifier as compressor for JavaScript assets
gem 'uglifier', '>= 1.3.0'
# Use CoffeeScript for .js.coffee assets and views
gem 'coffee-rails', '~> 4.0.0'
# See https://github.com/sstephenson/execjs#readme for more supported runtimes
# gem 'therubyracer', platforms: :ruby
# Use jquery as the JavaScript library
gem 'jquery-rails'
# Turbolinks makes following links in your web application faster. Read more: https://github.com/rails/turbolinks
gem 'turbolinks'
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
gem 'jbuilder', '~> 1.2'
group :doc do
# bundle exec rake doc:rails generates the API under doc/api.
gem 'sdoc', require: false
end
# Use ActiveModel has_secure_password
# gem 'bcrypt-ruby', '~> 3.1.2'
# Use unicorn as the app server
# gem 'unicorn'
# Use Capistrano for deployment
# gem 'capistrano', group: :development
# Use debugger
# gem 'debugger', group: [:development, :test]
group :test, :development do
gem "rspec-rails", "~> 2.13.1"
end
group :test do
gem "capybara", "2.1.0"
end
and my Gemfile.lock:
GEM
remote: https://rubygems.org/
specs:
actionmailer (4.0.2)
actionpack (= 4.0.2)
mail (~> 2.5.4)
actionpack (4.0.2)
activesupport (= 4.0.2)
builder (~> 3.1.0)
erubis (~> 2.7.0)
rack (~> 1.5.2)
rack-test (~> 0.6.2)
activemodel (4.0.2)
activesupport (= 4.0.2)
builder (~> 3.1.0)
activerecord (4.0.2)
activemodel (= 4.0.2)
activerecord-deprecated_finders (~> 1.0.2)
activesupport (= 4.0.2)
arel (~> 4.0.0)
activerecord-deprecated_finders (1.0.3)
activesupport (4.0.2)
i18n (~> 0.6, >= 0.6.4)
minitest (~> 4.2)
multi_json (~> 1.3)
thread_safe (~> 0.1)
tzinfo (~> 0.3.37)
arel (4.0.1)
atomic (1.1.14)
builder (3.1.4)
capybara (2.1.0)
mime-types (>= 1.16)
nokogiri (>= 1.3.3)
rack (>= 1.0.0)
rack-test (>= 0.5.4)
xpath (~> 2.0)
coffee-rails (4.0.1)
coffee-script (>= 2.2.0)
railties (>= 4.0.0, < 5.0)
coffee-script (2.2.0)
coffee-script-source
execjs
coffee-script-source (1.6.3)
diff-lcs (1.2.5)
erubis (2.7.0)
execjs (2.0.2)
hike (1.2.3)
i18n (0.6.9)
jbuilder (1.5.3)
activesupport (>= 3.0.0)
multi_json (>= 1.2.0)
jquery-rails (3.0.4)
railties (>= 3.0, < 5.0)
thor (>= 0.14, < 2.0)
json (1.8.1)
mail (2.5.4)
mime-types (~> 1.16)
treetop (~> 1.4.8)
mime-types (1.25.1)
mini_portile (0.5.2)
minitest (4.7.5)
multi_json (1.8.2)
nokogiri (1.6.1)
mini_portile (~> 0.5.0)
polyglot (0.3.3)
rack (1.5.2)
rack-test (0.6.2)
rack (>= 1.0)
rails (4.0.2)
actionmailer (= 4.0.2)
actionpack (= 4.0.2)
activerecord (= 4.0.2)
activesupport (= 4.0.2)
bundler (>= 1.3.0, < 2.0)
railties (= 4.0.2)
sprockets-rails (~> 2.0.0)
railties (4.0.2)
actionpack (= 4.0.2)
activesupport (= 4.0.2)
rake (>= 0.8.7)
thor (>= 0.18.1, < 2.0)
rake (10.1.1)
rdoc (3.12.2)
json (~> 1.4)
rspec-core (2.13.1)
rspec-expectations (2.13.0)
diff-lcs (>= 1.1.3, < 2.0)
rspec-mocks (2.13.1)
rspec-rails (2.13.1)
actionpack (>= 3.0)
activesupport (>= 3.0)
railties (>= 3.0)
rspec-core (~> 2.13.0)
rspec-expectations (~> 2.13.0)
rspec-mocks (~> 2.13.0)
sass (3.2.13)
sass-rails (4.0.1)
railties (>= 4.0.0, < 5.0)
sass (>= 3.1.10)
sprockets-rails (~> 2.0.0)
sdoc (0.3.20)
json (>= 1.1.3)
rdoc (~> 3.10)
sprockets (2.10.1)
hike (~> 1.2)
multi_json (~> 1.0)
rack (~> 1.0)
tilt (~> 1.1, != 1.3.0)
sprockets-rails (2.0.1)
actionpack (>= 3.0)
activesupport (>= 3.0)
sprockets (~> 2.8)
sqlite3 (1.3.8)
thor (0.18.1)
thread_safe (0.1.3)
atomic
tilt (1.4.1)
treetop (1.4.15)
polyglot
polyglot (>= 0.3.1)
turbolinks (2.1.0)
coffee-rails
tzinfo (0.3.38)
uglifier (2.4.0)
execjs (>= 0.3.0)
json (>= 1.8.0)
xpath (2.0.0)
nokogiri (~> 1.3)
PLATFORMS
ruby
DEPENDENCIES
capybara (= 2.1.0)
coffee-rails (~> 4.0.0)
jbuilder (~> 1.2)
jquery-rails
rails (= 4.0.2)
rspec-rails (~> 2.13.1)
sass-rails (~> 4.0.0)
sdoc
sqlite3
turbolinks
uglifier (>= 1.3.0)
Run the spec using
$ bundle exec rspec spec/features/list_movies_spec.rb
This will ensure the command is executed with the same version listed in your Gemfile.
It's likely you have more than one rspec versions installed on the system. Using rspec command directly will load the latest, but this conflicts with the version listed in your Gemfile.
Other possible solutions are:
uninstall all versions except the one listed in the Gemfile
upgrade the rspec version in the Gemfile
I solved a similar issue by using a different RVM gemset.
I created a new gemset just for this Rails app and then ran bundle install. Then everything worked properly.
$ rvm gemset create app_name_here
$ rvm gemset use app_name_here
$ bundle install

The page you were looking for doesn't exist - heroku+rails

Good day. I am trying to deploy rails-application on heroku according to Hartl's book Ruby on Rails tutorial. I did $ git push heroku master and it was done correctly. But when i use $ heroku open there is a text
`The page you were looking for doesn't exist.
You may have mistyped the address or the page may have moved. When I start rails locally with $ rails s there are no mistakes and 127.0.0.1:3000 works nicely. But if I use $ rails s -e production there is a similar mistake
The page you were looking for doesn't exist. You may have mistyped the
address or the page may have moved.
Btw, according to similar's issues I tried to change
config.assets.compile = true
My Gemfile.lock:
remote: https://rubygems.org/
specs:
actionmailer (4.0.2)
actionpack (= 4.0.2)
mail (~> 2.5.4)
actionpack (4.0.2)
activesupport (= 4.0.2)
builder (~> 3.1.0)
erubis (~> 2.7.0)
rack (~> 1.5.2)
rack-test (~> 0.6.2)
activemodel (4.0.2)
activesupport (= 4.0.2)
builder (~> 3.1.0)
activerecord (4.0.2)
activemodel (= 4.0.2)
activerecord-deprecated_finders (~> 1.0.2)
activesupport (= 4.0.2)
arel (~> 4.0.0)
activerecord-deprecated_finders (1.0.3)
activesupport (4.0.2)
i18n (~> 0.6, >= 0.6.4)
minitest (~> 4.2)
multi_json (~> 1.3)
thread_safe (~> 0.1)
tzinfo (~> 0.3.37)
addressable (2.3.5)
arel (4.0.1)
atomic (1.1.14)
builder (3.1.4)
coffee-rails (4.0.1)
coffee-script (>= 2.2.0)
railties (>= 4.0.0, < 5.0)
coffee-script (2.2.0)
coffee-script-source
execjs
coffee-script-source (1.6.3)
erubis (2.7.0)
excon (0.25.3)
execjs (2.0.2)
heroku (3.2.1)
heroku-api (~> 0.3.7)
launchy (>= 0.3.2)
netrc (~> 0.7.7)
rest-client (~> 1.6.1)
rubyzip
heroku-api (0.3.15)
excon (~> 0.25.1)
hike (1.2.3)
i18n (0.6.9)
jbuilder (1.5.3)
activesupport (>= 3.0.0)
multi_json (>= 1.2.0)
jquery-rails (3.0.4)
railties (>= 3.0, < 5.0)
thor (>= 0.14, < 2.0)
json (1.8.1)
launchy (2.4.2)
addressable (~> 2.3)
mail (2.5.4)
mime-types (~> 1.16)
treetop (~> 1.4.8)
mime-types (1.25.1)
minitest (4.7.5)
multi_json (1.8.2)
netrc (0.7.7)
pg (0.17.1-x86-mingw32)
polyglot (0.3.3)
rack (1.5.2)
rack-test (0.6.2)
rack (>= 1.0)
rails (4.0.2)
actionmailer (= 4.0.2)
actionpack (= 4.0.2)
activerecord (= 4.0.2)
activesupport (= 4.0.2)
bundler (>= 1.3.0, < 2.0)
railties (= 4.0.2)
sprockets-rails (~> 2.0.0)
railties (4.0.2)
actionpack (= 4.0.2)
activesupport (= 4.0.2)
rake (>= 0.8.7)
thor (>= 0.18.1, < 2.0)
rake (10.1.1)
rdoc (3.12.2)
json (~> 1.4)
rest-client (1.6.7)
mime-types (>= 1.16)
rubyzip (1.1.0)
sass (3.2.13)
sass-rails (4.0.1)
railties (>= 4.0.0, < 5.0)
sass (>= 3.1.10)
sprockets-rails (~> 2.0.0)
sdoc (0.3.20)
json (>= 1.1.3)
rdoc (~> 3.10)
sprockets (2.10.1)
hike (~> 1.2)
multi_json (~> 1.0)
rack (~> 1.0)
tilt (~> 1.1, != 1.3.0)
sprockets-rails (2.0.1)
actionpack (>= 3.0)
activesupport (>= 3.0)
sprockets (~> 2.8)
sqlite3 (1.3.8-x64-mingw32)
sqlite3 (1.3.8-x86-mingw32)
sqlite3-ruby (1.3.3)
sqlite3 (>= 1.3.3)
thor (0.18.1)
thread_safe (0.1.3)
atomic
tilt (1.4.1)
treetop (1.4.15)
polyglot
polyglot (>= 0.3.1)
turbolinks (2.1.0)
coffee-rails
tzinfo (0.3.38)
uglifier (2.4.0)
execjs (>= 0.3.0)
json (>= 1.8.0)
PLATFORMS
x64-mingw32
x86-mingw32
DEPENDENCIES
coffee-rails (~> 4.0.0)
heroku
jbuilder (~> 1.2)
jquery-rails
pg
rails (= 4.0.2)
sass-rails (~> 4.0.0)
sdoc
sqlite3 (= 1.3.8)
sqlite3-ruby
turbolinks
uglifier (>= 1.3.0)
My Gemfile
source 'https://rubygems.org'
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '4.0.2'
# Use sqlite3 as the database for Active Record
group :development, :test do
gem 'sqlite3-ruby', :require => 'sqlite3'
gem 'sqlite3', '1.3.8'
end
# Use SCSS for stylesheets
gem 'sass-rails', '~> 4.0.0'
gem 'heroku'
# Use Uglifier as compressor for JavaScript assets
gem 'uglifier', '>= 1.3.0'
# Use CoffeeScript for .js.coffee assets and views
gem 'coffee-rails', '~> 4.0.0'
# See https://github.com/sstephenson/execjs#readme for more supported runtimes
# gem 'therubyracer', platforms: :ruby
# Use jquery as the JavaScript library
gem 'jquery-rails'
# Turbolinks makes following links in your web application faster. Read more: https://github.com/rails/turbolinks
gem 'turbolinks'
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
gem 'jbuilder', '~> 1.2'
group :doc do
# bundle exec rake doc:rails generates the API under doc/api.
gem 'sdoc', require: false
end
# Use ActiveModel has_secure_password
# gem 'bcrypt-ruby', '~> 3.1.2'
# Use unicorn as the app server
# gem 'unicorn'
# Use Capistrano for deployment
# gem 'capistrano', group: :development
# Use debugger
# gem 'debugger', group: [:development, :test]
group :production do
gem 'pg'
end
routes.rb:
FirstApp::Application.routes.draw do
many comments
end
It's just created project with rails new. There is the same message if I try to get another pages.
I just ran into some similar issues a few weeks ago - it could be many things but here are some things that I forgot when doing this for the first time
Migrate your prod db heroku run rake db:migrate
make sure heroku has your precompiled assets - rake assets:precompile and push again to heroku
Also, check this section, Hartl mentions that you need a root route defined in order for the default rails page to work on heroku.

Bundle Install does not correctly identify my version of Ruby

I am trying to run Ruby on Rails from my Windows 7 laptop. When I type bundle install in the Git Bash it says, "Your ruby version is 1.9.3, but your Gemfile specified 2.0.0
I have Ruby 2.0.0 installed, and when I type ruby -v it lists
ruby 2.0.0p247 (2013-06-27) [i386-mingw32]
Here is my Gemfile
source 'https://rubygems.org'
ruby '2.0.0'
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '4.0.1'
# Use postgresql as the database for Active Record
gem 'pg', '0.17.0'
gem 'rails_12factor', '0.0.2'
# Use SCSS for stylesheets
gem 'sass-rails', '~> 4.0.0'
# Use Uglifier as compressor for JavaScript assets
gem 'uglifier', '>= 1.3.0'
# Use CoffeeScript for .js.coffee assets and views
gem 'coffee-rails', '~> 4.0.0'
# See https://github.com/sstephenson/execjs#readme for more supported runtimes
# gem 'therubyracer', platforms: :ruby
# Use jquery as the JavaScript library
gem 'jquery-rails'
# Turbolinks makes following links in your web application faster. Read more: https://github.com/rails/turbolinks
gem 'turbolinks'
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
gem 'jbuilder', '~> 1.2'
group :doc do
# bundle exec rake doc:rails generates the API under doc/api.
gem 'sdoc', require: false
end
# Use ActiveModel has_secure_password
# gem 'bcrypt-ruby', '~> 3.1.2'
# Use unicorn as the app server
# gem 'unicorn'
# Use Capistrano for deployment
# gem 'capistrano', group: :development
# Use debugger
# gem 'debugger', group: [:development, :test]
And here is my Gemfile.lock
GEM
remote: https://rubygems.org/
specs:
actionmailer (4.0.1)
actionpack (= 4.0.1)
mail (~> 2.5.4)
actionpack (4.0.1)
activesupport (= 4.0.1)
builder (~> 3.1.0)
erubis (~> 2.7.0)
rack (~> 1.5.2)
rack-test (~> 0.6.2)
activemodel (4.0.1)
activesupport (= 4.0.1)
builder (~> 3.1.0)
activerecord (4.0.1)
activemodel (= 4.0.1)
activerecord-deprecated_finders (~> 1.0.2)
activesupport (= 4.0.1)
arel (~> 4.0.0)
activerecord-deprecated_finders (1.0.3)
activesupport (4.0.1)
i18n (~> 0.6, >= 0.6.4)
minitest (~> 4.2)
multi_json (~> 1.3)
thread_safe (~> 0.1)
tzinfo (~> 0.3.37)
arel (4.0.1)
atomic (1.1.14)
builder (3.1.4)
coffee-rails (4.0.1)
coffee-script (>= 2.2.0)
railties (>= 4.0.0, < 5.0)
coffee-script (2.2.0)
coffee-script-source
execjs
coffee-script-source (1.6.3)
erubis (2.7.0)
execjs (2.0.2)
hike (1.2.3)
i18n (0.6.5)
jbuilder (1.5.2)
activesupport (>= 3.0.0)
multi_json (>= 1.2.0)
jquery-rails (3.0.4)
railties (>= 3.0, < 5.0)
thor (>= 0.14, < 2.0)
json (1.8.1)
mail (2.5.4)
mime-types (~> 1.16)
treetop (~> 1.4.8)
mime-types (1.25)
minitest (4.7.5)
multi_json (1.8.2)
pg (0.17.0-x86-mingw32)
polyglot (0.3.3)
rack (1.5.2)
rack-test (0.6.2)
rack (>= 1.0)
rails (4.0.1)
actionmailer (= 4.0.1)
actionpack (= 4.0.1)
activerecord (= 4.0.1)
activesupport (= 4.0.1)
bundler (>= 1.3.0, < 2.0)
railties (= 4.0.1)
sprockets-rails (~> 2.0.0)
rails_12factor (0.0.2)
rails_serve_static_assets
rails_stdout_logging
rails_serve_static_assets (0.0.1)
rails_stdout_logging (0.0.3)
railties (4.0.1)
actionpack (= 4.0.1)
activesupport (= 4.0.1)
rake (>= 0.8.7)
thor (>= 0.18.1, < 2.0)
rake (10.1.0)
rdoc (3.12.2)
json (~> 1.4)
sass (3.2.12)
sass-rails (4.0.1)
railties (>= 4.0.0, < 5.0)
sass (>= 3.1.10)
sprockets-rails (~> 2.0.0)
sdoc (0.3.20)
json (>= 1.1.3)
rdoc (~> 3.10)
sprockets (2.10.0)
hike (~> 1.2)
multi_json (~> 1.0)
rack (~> 1.0)
tilt (~> 1.1, != 1.3.0)
sprockets-rails (2.0.1)
actionpack (>= 3.0)
activesupport (>= 3.0)
sprockets (~> 2.8)
thor (0.18.1)
thread_safe (0.1.3)
atomic
tilt (1.4.1)
treetop (1.4.15)
polyglot
polyglot (>= 0.3.1)
turbolinks (1.3.0)
coffee-rails
tzinfo (0.3.38)
uglifier (2.3.1)
execjs (>= 0.3.0)
json (>= 1.8.0)
PLATFORMS
x86-mingw32
DEPENDENCIES
coffee-rails (~> 4.0.0)
jbuilder (~> 1.2)
jquery-rails
pg (= 0.17.0)
rails (= 4.0.1)
rails_12factor (= 0.0.2)
sass-rails (~> 4.0.0)
sdoc
turbolinks
uglifier (>= 1.3.0)
Thx.
Do you have gemset for the project?
Try
rvm gemset list
to see if you are using the correct gemset. Also make sure use
rvm use 2.0.0
before run bundle.

Resources