heroku db:pull errors - ruby-on-rails

Well, I used to be able to push and pull with heroku, but it just asked me to upgrade taps, so I did. Once I did that I started getting errors that look like this when I attempt a db:pull
Receiving schema
/Library/Ruby/Gems/1.8/gems/taps-0.3.21/bin/schema:3:
in `require': no such file to load -- rubygems (LoadError)
from /Library/Ruby/Gems/1.8/gems/taps-0.3.21/bin/schema:3
/Library/Ruby/Gems/1.8/gems/taps-0.3.21/bin/schema:3:
in `require': no such file to load -- rubygems (LoadError)
from /Library/Ruby/Gems/1.8/gems/taps-0.3.21/bin/schema:3
/Library/Ruby/Gems/1.8/gems/taps-0.3.21/bin/schema:3:
in `require': no such file to load -- rubygems (LoadError)
from /Library/Ruby/Gems/1.8/gems/taps-0.3.21/bin/schema:3
Schema: 100% |==========================================| Time: 00:00:07
Receiving indexes
/Library/Ruby/Gems/1.8/gems/taps-0.3.21/bin/schema:3:
in `require': no such file to load -- rubygems (LoadError)
from /Library/Ruby/Gems/1.8/gems/taps-0.3.21/bin/schema:3
schema_migrat: 100% |==========================================| Time: 00:00:00
Receiving data
3 tables, 600 records
/Library/Ruby/Gems/1.8/gems/sqlite3-ruby-1.2.5/lib/sqlite3/errors.rb:62:
in `check': SQLite3::SQLException: PRIMARY KEY must be unique (Sequel::DatabaseError)
from /Library/Ruby/Gems/1.8/gems/sqlite3-ruby-1.2.5/lib/sqlite3/resultset.rb:56:in `check'
from /Library/Ruby/Gems/1.8/gems/sqlite3-ruby-1.2.5/lib/sqlite3/resultset.rb:48:in `commence'
from /Library/Ruby/Gems/1.8/gems/sqlite3-ruby-1.2.5/lib/sqlite3/resultset.rb:38:in `initialize'
from /Library/Ruby/Gems/1.8/gems/sqlite3-ruby-1.2.5/lib/sqlite3/statement.rb:136:in `new'
from /Library/Ruby/Gems/1.8/gems/sqlite3-ruby-1.2.5/lib/sqlite3/statement.rb:136:in `execute'
from /Library/Ruby/Gems/1.8/gems/sqlite3-ruby-1.2.5/lib/sqlite3/database.rb:232:in `execute_batch'
from /Library/Ruby/Gems/1.8/gems/sqlite3-ruby-1.2.5/lib/sqlite3/database.rb:163:in `prepare'
from /Library/Ruby/Gems/1.8/gems/sqlite3-ruby-1.2.5/lib/sqlite3/database.rb:231:in `execute_batch'
from /Library/Ruby/Gems/1.8/gems/sequel-3.20.0/lib/sequel/adapters/sqlite.rb:130:in `_execute'
from /Library/Ruby/Gems/1.8/gems/sequel-3.20.0/lib/sequel/database/logging.rb:28:in `log_yield'
from /Library/Ruby/Gems/1.8/gems/sequel-3.20.0/lib/sequel/adapters/sqlite.rb:130:in `_execute'
from /Library/Ruby/Gems/1.8/gems/sequel-3.20.0/lib/sequel/connection_pool/threaded.rb:71:in `hold'
from /Library/Ruby/Gems/1.8/gems/sequel-3.20.0/lib/sequel/database/connecting.rb:226:in `synchronize'
from /Library/Ruby/Gems/1.8/gems/sequel-3.20.0/lib/sequel/adapters/sqlite.rb:117:in `_execute'
from /Library/Ruby/Gems/1.8/gems/sequel-3.20.0/lib/sequel/adapters/sqlite.rb:87:in `execute_dui'
from /Library/Ruby/Gems/1.8/gems/sequel-3.20.0/lib/sequel/dataset/actions.rb:552:in `execute_dui'
from /Library/Ruby/Gems/1.8/gems/sequel-3.20.0/lib/sequel/dataset/actions.rb:243:in `import'
from /Library/Ruby/Gems/1.8/gems/sequel-3.20.0/lib/sequel/dataset/actions.rb:243:in `each'
from /Library/Ruby/Gems/1.8/gems/sequel-3.20.0/lib/sequel/dataset/actions.rb:243:in `import'
from /Library/Ruby/Gems/1.8/gems/sequel-3.20.0/lib/sequel/database/query.rb:223:in `_transaction'
from /Library/Ruby/Gems/1.8/gems/sequel-3.20.0/lib/sequel/database/query.rb:209:in `transaction'
from /Library/Ruby/Gems/1.8/gems/sequel-3.20.0/lib/sequel/connection_pool/threaded.rb:84:in `hold'
from /Library/Ruby/Gems/1.8/gems/sequel-3.20.0/lib/sequel/database/connecting.rb:226:in `synchronize'
from /Library/Ruby/Gems/1.8/gems/sequel-3.20.0/lib/sequel/database/query.rb:207:in `transaction'
from /Library/Ruby/Gems/1.8/gems/sequel-3.20.0/lib/sequel/dataset/actions.rb:243:in `import'
from /Library/Ruby/Gems/1.8/gems/taps-0.3.21/lib/taps/data_stream.rb:315:in `import_rows'
from /Library/Ruby/Gems/1.8/gems/taps-0.3.21/lib/taps/data_stream.rb:142:in `fetch_remote'
from /Library/Ruby/Gems/1.8/gems/taps-0.3.21/lib/taps/operation.rb:308:in `pull_data_from_table'
from /Library/Ruby/Gems/1.8/gems/taps-0.3.21/lib/taps/operation.rb:301:in `loop'
from /Library/Ruby/Gems/1.8/gems/taps-0.3.21/lib/taps/operation.rb:301:in `pull_data_from_table'
from /Library/Ruby/Gems/1.8/gems/taps-0.3.21/lib/taps/operation.rb:284:in `pull_data'
from /Library/Ruby/Gems/1.8/gems/taps-0.3.21/lib/taps/operation.rb:278:in `each'
from /Library/Ruby/Gems/1.8/gems/taps-0.3.21/lib/taps/operation.rb:278:in `pull_data'
from /Library/Ruby/Gems/1.8/gems/taps-0.3.21/lib/taps/operation.rb:253:in `run'
from /Library/Ruby/Gems/1.8/gems/taps-0.3.21/lib/taps/operation.rb:203:in `call'
from /Library/Ruby/Gems/1.8/gems/taps-0.3.21/lib/taps/operation.rb:203:in `catch_errors'
from /Library/Ruby/Gems/1.8/gems/taps-0.3.21/lib/taps/operation.rb:246:in `run'
from /Library/Ruby/Gems/1.8/gems/taps-0.3.21/lib/taps/cli.rb:171:in `clientxfer'
from /Library/Ruby/Gems/1.8/gems/heroku-1.19.1/lib/heroku/commands/db.rb:152:in `taps_client'
from /Library/Ruby/Gems/1.8/gems/heroku-1.19.1/lib/heroku/commands/db.rb:25:in `pull'
from /Library/Ruby/Gems/1.8/gems/heroku-1.19.1/lib/heroku/command.rb:49:in `send'
from /Library/Ruby/Gems/1.8/gems/heroku-1.19.1/lib/heroku/command.rb:49:in `run_internal'
from /Library/Ruby/Gems/1.8/gems/heroku-1.19.1/lib/heroku/command.rb:21:in `run'
from /Library/Ruby/Gems/1.8/gems/heroku-1.19.1/bin/heroku:13
from /usr/bin/heroku:19:in `load'
from /usr/bin/heroku:19
Eventually I ended up trying to upgrade everything in sight, including:
sequel
heroku
rubygems
and of course taps

The answer was to restart my webrick server, gosh i feel dumb.

Related

I keep getting an error in ruby : cannot load such file --spec_helper

I am supposed to type "rake" in the terminal form directory 00_hello and get an error like
(cannot load such file -- test-first-teaching/hello/hello (LoadError)), but instead I keep getting this error:
(in /Users/deianp17/learn_ruby) /Users/deianp17/.rvm/rubies/ruby-2.2.1/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require': cannot load such file -- spec_helper (LoadError) from /Users/deianp17/.rvm/rubies/ruby-2.2.1/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require' from /Users/deianp17/.rvm/gems/ruby-2.2.1/gems/rspec-core-3.4.2/lib/rspec/core/configuration.rb:1295:in `block in requires=' from /Users/deianp17/.rvm/gems/ruby-2.2.1/gems/rspec-core-3.4.2/lib/rspec/core/configuration.rb:1295:in `each' from /Users/deianp17/.rvm/gems/ruby-2.2.1/gems/rspec-core-3.4.2/lib/rspec/core/configuration.rb:1295:in `requires=' from /Users/deianp17/.rvm/gems/ruby-2.2.1/gems/rspec-core-3.4.2/lib/rspec/core/configuration_options.rb:109:in `block in process_options_into' from /Users/deianp17/.rvm/gems/ruby-2.2.1/gems/rspec-core-3.4.2/lib/rspec/core/configuration_options.rb:108:in `each' from /Users/deianp17/.rvm/gems/ruby-2.2.1/gems/rspec-core-3.4.2/lib/rspec/core/configuration_options.rb:108:in `process_options_into' from /Users/deianp17/.rvm/gems/ruby-2.2.1/gems/rspec-core-3.4.2/lib/rspec/core/configuration_options.rb:21:in `configure' from /Users/deianp17/.rvm/gems/ruby-2.2.1/gems/rspec-core-3.4.2/lib/rspec/core/runner.rb:105:in `setup' from /Users/deianp17/.rvm/gems/ruby-2.2.1/gems/rspec-core-3.4.2/lib/rspec/core/runner.rb:92:in `run' from /Users/deianp17/.rvm/gems/ruby-2.2.1/gems/rspec-core-3.4.2/lib/rspec/core/runner.rb:78:in `run' from /Users/deianp17/.rvm/gems/ruby-2.2.1/gems/rspec-core-3.4.2/lib/rspec/core/runner.rb:45:in `invoke' from /Users/deianp17/.rvm/gems/ruby-2.2.1/gems/rspec-core-3.4.2/exe/rspec:4:in `<main>'
Now, I've tried a lot of things and looked around google/stackoverflow for answers but none work..or maybe I'm doing something wrong

Rails 3-2-stable on Ruby 2.0, Psych error on bundle

Due to an issue in Sprockets that fails in Ruby 2.0, I need to update my Rails version to the latest version. As a result, my Gemfile looks like this:
gem 'rails', git: 'git://github.com/rails/rails.git', branch: "3-2-stable"
which then results in the stack trace shown below. Rails edge also shows the same problem, though they are running their test suite against Ruby 2.0 so it must be compatible.
So I'm guessing there may be dependent libraries that either Rails or Ruby were built against that aren't playing nice with Ruby 2.0-preview1
> bundle
Updating git://github.com/rails/rails.git
Unfortunately, a fatal error has occurred. Please see the Bundler
troubleshooting documentation at http://bit.ly/bundler-issues. Thanks!
.rvm/rubies/ruby-2.0.0-preview1/lib/ruby/2.0.0/psych.rb:205:in `parse': (<unknown>): mapping values are not allowed in this context at line 8 column 35 (Psych::SyntaxError)
from .rvm/rubies/ruby-2.0.0-preview1/lib/ruby/2.0.0/psych.rb:205:in `parse_stream'
from .rvm/rubies/ruby-2.0.0-preview1/lib/ruby/2.0.0/psych.rb:153:in `parse'
from .rvm/rubies/ruby-2.0.0-preview1/lib/ruby/2.0.0/psych.rb:129:in `load'
from .rvm/rubies/ruby-2.0.0-preview1/lib/ruby/site_ruby/2.0.0/rubygems/specification.rb:491:in `from_yaml'
from .rvm/gems/ruby-2.0.0-preview1#global/gems/bundler-1.2.1/lib/bundler.rb:294:in `block in load_gemspec_uncached'
from .rvm/gems/ruby-2.0.0-preview1#global/gems/bundler-1.2.1/lib/bundler.rb:291:in `chdir'
from .rvm/gems/ruby-2.0.0-preview1#global/gems/bundler-1.2.1/lib/bundler.rb:291:in `load_gemspec_uncached'
from .rvm/gems/ruby-2.0.0-preview1#global/gems/bundler-1.2.1/lib/bundler.rb:282:in `load_gemspec'
from .rvm/gems/ruby-2.0.0-preview1#global/gems/bundler-1.2.1/lib/bundler/source.rb:411:in `block in load_spec_files'
from .rvm/gems/ruby-2.0.0-preview1#global/gems/bundler-1.2.1/lib/bundler/source.rb:410:in `each'
from .rvm/gems/ruby-2.0.0-preview1#global/gems/bundler-1.2.1/lib/bundler/source.rb:410:in `load_spec_files'
from .rvm/gems/ruby-2.0.0-preview1#global/gems/bundler-1.2.1/lib/bundler/source.rb:799:in `load_spec_files'
from .rvm/gems/ruby-2.0.0-preview1#global/gems/bundler-1.2.1/lib/bundler/source.rb:381:in `local_specs'
from .rvm/gems/ruby-2.0.0-preview1#global/gems/bundler-1.2.1/lib/bundler/source.rb:774:in `specs'
from .rvm/gems/ruby-2.0.0-preview1#global/gems/bundler-1.2.1/lib/bundler/definition.rb:491:in `block in converge_locked_specs'
from .rvm/gems/ruby-2.0.0-preview1#global/gems/bundler-1.2.1/lib/bundler/definition.rb:480:in `each'
from .rvm/gems/ruby-2.0.0-preview1#global/gems/bundler-1.2.1/lib/bundler/definition.rb:480:in `converge_locked_specs'
from .rvm/gems/ruby-2.0.0-preview1#global/gems/bundler-1.2.1/lib/bundler/definition.rb:166:in `resolve'
from .rvm/gems/ruby-2.0.0-preview1#global/gems/bundler-1.2.1/lib/bundler/definition.rb:113:in `specs'
from .rvm/gems/ruby-2.0.0-preview1#global/gems/bundler-1.2.1/lib/bundler/definition.rb:108:in `resolve_remotely!'
from .rvm/gems/ruby-2.0.0-preview1#global/gems/bundler-1.2.1/lib/bundler/installer.rb:81:in `run'
from .rvm/gems/ruby-2.0.0-preview1#global/gems/bundler-1.2.1/lib/bundler/installer.rb:14:in `install'
from .rvm/gems/ruby-2.0.0-preview1#global/gems/bundler-1.2.1/lib/bundler/cli.rb:230:in `install'
from .rvm/gems/ruby-2.0.0-preview1#global/gems/bundler-1.2.1/lib/bundler/vendor/thor/task.rb:27:in `run'
from .rvm/gems/ruby-2.0.0-preview1#global/gems/bundler-1.2.1/lib/bundler/vendor/thor/invocation.rb:120:in `invoke_task'
from .rvm/gems/ruby-2.0.0-preview1#global/gems/bundler-1.2.1/lib/bundler/vendor/thor.rb:275:in `dispatch'
from .rvm/gems/ruby-2.0.0-preview1#global/gems/bundler-1.2.1/lib/bundler/vendor/thor/base.rb:408:in `start'
from .rvm/gems/ruby-2.0.0-preview1#global/gems/bundler-1.2.1/bin/bundle:14:in `block in <top (required)>'
from .rvm/gems/ruby-2.0.0-preview1#global/gems/bundler-1.2.1/lib/bundler/friendly_errors.rb:4:in `with_friendly_errors'
from .rvm/gems/ruby-2.0.0-preview1#global/gems/bundler-1.2.1/bin/bundle:14:in `<top (required)>'
from .rvm/gems/ruby-2.0.0-preview1#global/bin/bundle:19:in `load'
from .rvm/gems/ruby-2.0.0-preview1#global/bin/bundle:19:in `<main>'
from .rvm/gems/ruby-2.0.0-preview1#album_releases/bin/ruby_noexec_wrapper:14:in `eval'
from .rvm/gems/ruby-2.0.0-preview1#album_releases/bin/ruby_noexec_wrapper:14:in `<main>'
This was a bug in Bundler, as described here: https://github.com/rails/rails/issues/8136
It has since been fixed.
I had this issue. It was caused by psych seeing code like "this:" in a heredoc within a gemspec (Prawn, in my case), and thinking it was a hash. I believe it's a regression in 2.0.0-preview1, because i had had ruby-head prior, and did not hit this issue.

spec with guard, rails 3.1.1, and ruby 1.9.3 getting cannot load such file errors

HI all I just recently installed rvm and all that good stuff on my macbook air and I started my rails 3.1.1 app with ruby 1.9.3. In my gem file I put down guard and rspec, now when I try and run rspec by itself or with guard I get errors thrown at me and I'm not sure why,
the output I get when I run is such,
phantom:tasks maxmarze$ guard
Please install rb-fsevent gem for Mac OSX FSEvents support
Using polling (Please help us to support your system better than that).
Please install growl_notify or growl gem for Mac OS X notification support and add it to your Gemfile
Guard is now watching at '/Users/maxmarze/rails_projects/tasks'
Guard::RSpec is running, with RSpec 2!
Running all specs
/Users/maxmarze/rails_projects/tasks/spec/requests/tasks_spec.rb:1:in `require': cannot load such file -- spec_helper (LoadError)
from /Users/maxmarze/rails_projects/tasks/spec/requests/tasks_spec.rb:1:in `<top (required)>'
from /Users/maxmarze/.rvm/gems/ruby-1.9.3-head/gems/rspec-core-2.7.1/lib/rspec/core/configuration.rb:459:in `load'
from /Users/maxmarze/.rvm/gems/ruby-1.9.3-head/gems/rspec-core-2.7.1/lib/rspec/core/configuration.rb:459:in `block in load_spec_files'
from /Users/maxmarze/.rvm/gems/ruby-1.9.3-head/gems/rspec-core-2.7.1/lib/rspec/core/configuration.rb:459:in `map'
from /Users/maxmarze/.rvm/gems/ruby-1.9.3-head/gems/rspec-core-2.7.1/lib/rspec/core/configuration.rb:459:in `load_spec_files'
from /Users/maxmarze/.rvm/gems/ruby-1.9.3-head/gems/rspec-core-2.7.1/lib/rspec/core/command_line.rb:18:in `run'
from /Users/maxmarze/.rvm/gems/ruby-1.9.3-head/gems/rspec-core-2.7.1/lib/rspec/core/runner.rb:80:in `run_in_process'
from /Users/maxmarze/.rvm/gems/ruby-1.9.3-head/gems/rspec-core-2.7.1/lib/rspec/core/runner.rb:69:in `run'
from /Users/maxmarze/.rvm/gems/ruby-1.9.3-head/gems/rspec-core-2.7.1/lib/rspec/core/runner.rb:10:in `block in autorun'
Guard::RSpec is running, with RSpec 2!
Running all specs
/Users/maxmarze/rails_projects/tasks/spec/requests/tasks_spec.rb:1:in `require': cannot load such file -- spec_helper (LoadError)
from /Users/maxmarze/rails_projects/tasks/spec/requests/tasks_spec.rb:1:in `<top (required)>'
from /Users/maxmarze/.rvm/gems/ruby-1.9.3-head/gems/rspec-core-2.7.1/lib/rspec/core/configuration.rb:459:in `load'
from /Users/maxmarze/.rvm/gems/ruby-1.9.3-head/gems/rspec-core-2.7.1/lib/rspec/core/configuration.rb:459:in `block in load_spec_files'
from /Users/maxmarze/.rvm/gems/ruby-1.9.3-head/gems/rspec-core-2.7.1/lib/rspec/core/configuration.rb:459:in `map'
from /Users/maxmarze/.rvm/gems/ruby-1.9.3-head/gems/rspec-core-2.7.1/lib/rspec/core/configuration.rb:459:in `load_spec_files'
from /Users/maxmarze/.rvm/gems/ruby-1.9.3-head/gems/rspec-core-2.7.1/lib/rspec/core/command_line.rb:18:in `run'
from /Users/maxmarze/.rvm/gems/ruby-1.9.3-head/gems/rspec-core-2.7.1/lib/rspec/core/runner.rb:80:in `run_in_process'
from /Users/maxmarze/.rvm/gems/ruby-1.9.3-head/gems/rspec-core-2.7.1/lib/rspec/core/runner.rb:69:in `run'
from /Users/maxmarze/.rvm/gems/ruby-1.9.3-head/gems/rspec-core-2.7.1/lib/rspec/core/runner.rb:10:in `block in autorun'
and when I run it just with normal rspec commands or using bundle's bundle exec rspec spec/requests/tasks_spec.rb I get this output,
/Users/maxmarze/rails_projects/tasks/spec/requests/tasks_spec.rb:1:in `require': cannot load such file -- spec_helper (LoadError)
from /Users/maxmarze/rails_projects/tasks/spec/requests/tasks_spec.rb:1:in `<top (required)>'
from /Users/maxmarze/.rvm/gems/ruby-1.9.3-head/gems/rspec-core-2.7.1/lib/rspec/core/configuration.rb:459:in `load'
from /Users/maxmarze/.rvm/gems/ruby-1.9.3-head/gems/rspec-core-2.7.1/lib/rspec/core/configuration.rb:459:in `block in load_spec_files'
from /Users/maxmarze/.rvm/gems/ruby-1.9.3-head/gems/rspec-core-2.7.1/lib/rspec/core/configuration.rb:459:in `map'
from /Users/maxmarze/.rvm/gems/ruby-1.9.3-head/gems/rspec-core-2.7.1/lib/rspec/core/configuration.rb:459:in `load_spec_files'
from /Users/maxmarze/.rvm/gems/ruby-1.9.3-head/gems/rspec-core-2.7.1/lib/rspec/core/command_line.rb:18:in `run'
from /Users/maxmarze/.rvm/gems/ruby-1.9.3-head/gems/rspec-core-2.7.1/lib/rspec/core/runner.rb:80:in `run_in_process'
from /Users/maxmarze/.rvm/gems/ruby-1.9.3-head/gems/rspec-core-2.7.1/lib/rspec/core/runner.rb:69:in `run'
from /Users/maxmarze/.rvm/gems/ruby-1.9.3-head/gems/rspec-core-2.7.1/lib/rspec/core/runner.rb:10:in `block in autorun'
Needless to say I'm at a lose and have no clue why it is throwing me these errors, I've never had these problems before.
Checkout /Users/maxmarze/rails_projects/tasks/spec/spec_helper.rb, I think you forgot rails generate rspec:install

Error loading rubygems

During an operation (rspec related) that required loading rubygems (from config/boot.rb file) I got the following error message:
~/config/boot.rb:1:in `require': no such file to load -- rubygems (LoadError)
~/config/boot.rb:1
from ~/config/application.rb:1:in `require'
from ~/config/application.rb:1
from ~/config/environment.rb:2:in `require'
from ~/config/environment.rb:2
from ~/spec/spec_helper.rb:3:in `require'
from ~/spec/spec_helper.rb:3
from ~/spec/models/user_spec.rb:1:in `require'
from ~/spec/models/user_spec.rb:1
from /usr/lib/ruby/1.8/spec/runner/example_group_runner.rb:15:in `load'
from /usr/lib/ruby/1.8/spec/runner/example_group_runner.rb:15:in `load_files'
from /usr/lib/ruby/1.8/spec/runner/example_group_runner.rb:14:in `each'
from /usr/lib/ruby/1.8/spec/runner/example_group_runner.rb:14:in `load_files'
from /usr/lib/ruby/1.8/spec/runner/options.rb:132:in `run_examples'
from /usr/lib/ruby/1.8/spec/runner/command_line.rb:9:in `run'
from /usr/bin/spec:3
I looked for this error on SO and found the following topics:
ruby gem not found although it is installed and
no such file to load -- rubygems (LoadError)
However they both mentionned that the problem could come from the existance of multiple versions of ruby on the machine. Actually that was the case, so I decided to run a fresh installation of ruby and rails using RVM. But I still have the same problem!
Additional information:
which ruby
/usr/local/rvm/rubies/ruby-1.9.2-p136/bin/ruby
which rails
/usr/local/rvm/gems/ruby-1.9.2-p136/bin/rails
which gem
/usr/local/rvm/rubies/ruby-1.9.2-p136/bin/gem
gem --version
1.5.0
ls /usr/lib/ruby
1.8 1.9.1 gems
Any idea?
So I apparently solved my problem by using the command rspec instead of spec. If someone can explain what is actually going on behind the scene, it would be great!
amokrane#san-francisco ~/Documents/prog/web/learning_rails/forecaster/spec $ spec models/user_spec.rb
/home/amokrane/Documents/prog/web/learning_rails/forecaster/config/boot.rb:1:in `require': no such file to load -- rubygems (LoadError)
from /home/amokrane/Documents/prog/web/learning_rails/forecaster/config/boot.rb:1
from /home/amokrane/Documents/prog/web/learning_rails/forecaster/config/application.rb:1:in `require'
from /home/amokrane/Documents/prog/web/learning_rails/forecaster/config/application.rb:1
from /home/amokrane/Documents/prog/web/learning_rails/forecaster/config/environment.rb:2:in `require'
from /home/amokrane/Documents/prog/web/learning_rails/forecaster/config/environment.rb:2
from /home/amokrane/Documents/prog/web/learning_rails/forecaster/spec/spec_helper.rb:3:in `require'
from /home/amokrane/Documents/prog/web/learning_rails/forecaster/spec/spec_helper.rb:3
from /home/amokrane/Documents/prog/web/learning_rails/forecaster/spec/models/user_spec.rb:1:in `require'
from /home/amokrane/Documents/prog/web/learning_rails/forecaster/spec/models/user_spec.rb:1
from /usr/lib/ruby/1.8/spec/runner/example_group_runner.rb:15:in `load'
from /usr/lib/ruby/1.8/spec/runner/example_group_runner.rb:15:in `load_files'
from /usr/lib/ruby/1.8/spec/runner/example_group_runner.rb:14:in `each'
from /usr/lib/ruby/1.8/spec/runner/example_group_runner.rb:14:in `load_files'
from /usr/lib/ruby/1.8/spec/runner/options.rb:132:in `run_examples'
from /usr/lib/ruby/1.8/spec/runner/command_line.rb:9:in `run'
from /usr/bin/spec:3
amokrane#san-francisco ~/Documents/prog/web/learning_rails/forecaster/spec $ rspec models/weather_spec.rb
F
Failures:
1) Weather should be valid
Failure/Error: #weather = Weather.new
ActiveRecord::StatementInvalid:
Could not find table 'weathers'
# ./models/weather_spec.rb:6:in `new'
# ./models/weather_spec.rb:6:in `block (2 levels) in <top (required)>'
Finished in 0.11124 seconds
1 example, 1 failure

How to switch a Heroku Application from MySql to PostgreSql

I am running my Heroku Application on MySql Database.
Now i want to switch to the PostgreSql for some reason.For that i change database.yml and also change my migration files as required by PostgreSql.
I also change DATABASE_URL and SHARED_DATABASE_URL for the same application.
But when i go to the application it is getting crashed.
Heroku:logs showing following error
/disk1/home/slugs/181380_0fa1c59_dfd1-7eadaa54-533c-4617-b1de-bf74852a7afe/mnt/config/../vendor/rails/railties/lib/initializer.rb:271:in `require_frameworks': can't activate rack (~> 1.0.0, runtime) for [], already activated rack-1.1.0 for ["thin-1.2.6"] (RuntimeError)
from /disk1/home/slugs/181380_0fa1c59_dfd1-7eadaa54-533c-4617-b1de-bf74852a7afe/mnt/config/../vendor/rails/railties/lib/initializer.rb:134:in `process'
from /disk1/home/slugs/181380_0fa1c59_dfd1-7eadaa54-533c-4617-b1de-bf74852a7afe/mnt/config/../vendor/rails/railties/lib/initializer.rb:113:in `send'
from /disk1/home/slugs/181380_0fa1c59_dfd1-7eadaa54-533c-4617-b1de-bf74852a7afe/mnt/config/../vendor/rails/railties/lib/initializer.rb:113:in `run'
from /disk1/home/slugs/181380_0fa1c59_dfd1-7eadaa54-533c-4617-b1de-bf74852a7afe/mnt/config/environment.rb:9
from /usr/ruby1.8.7/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
from /usr/ruby1.8.7/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
from /usr/ruby1.8.7/lib/ruby/gems/1.8/gems/thin-1.2.6/lib/rack/adapter/rails.rb:42:in `load_application'
from /usr/ruby1.8.7/lib/ruby/gems/1.8/gems/thin-1.2.6/lib/rack/adapter/rails.rb:23:in `initialize'
from /home/heroku_rack/heroku.ru:29:in `new'
from /home/heroku_rack/heroku.ru:29
from /home/slugs/181380_0fa1c59_dfd1-7eadaa54-533c-4617-b1de-bf74852a7afe/mnt/.gems/gems/rack-1.1.0/lib/rack/builder.rb:46:in `instance_eval'
from /home/slugs/181380_0fa1c59_dfd1-7eadaa54-533c-4617-b1de-bf74852a7afe/mnt/.gems/gems/rack-1.1.0/lib/rack/builder.rb:46:in `initialize'
from /home/slugs/181380_0fa1c59_dfd1-7eadaa54-533c-4617-b1de-bf74852a7afe/mnt/.gems/gems/rack-1.1.0/lib/rack/builder.rb:63:in `new'
from /home/slugs/181380_0fa1c59_dfd1-7eadaa54-533c-4617-b1de-bf74852a7afe/mnt/.gems/gems/rack-1.1.0/lib/rack/builder.rb:63:in `map'
from /home/heroku_rack/heroku.ru:18
from /home/slugs/181380_0fa1c59_dfd1-7eadaa54-533c-4617-b1de-bf74852a7afe/mnt/.gems/gems/rack-1.1.0/lib/rack/builder.rb:46:in `instance_eval'
from /home/slugs/181380_0fa1c59_dfd1-7eadaa54-533c-4617-b1de-bf74852a7afe/mnt/.gems/gems/rack-1.1.0/lib/rack/builder.rb:46:in `initialize'
from /home/heroku_rack/heroku.ru:11:in `new'
from /home/heroku_rack/heroku.ru:11
from /home/slugs/181380_0fa1c59_dfd1-7eadaa54-533c-4617-b1de-bf74852a7afe/mnt/.gems/gems/rack-1.1.0/lib/rack/builder.rb:46:in `instance_eval'
from /home/slugs/181380_0fa1c59_dfd1-7eadaa54-533c-4617-b1de-bf74852a7afe/mnt/.gems/gems/rack-1.1.0/lib/rack/builder.rb:46:in `initialize'
from /home/heroku_rack/heroku.ru:1:in `new'
from /home/heroku_rack/heroku.ru:1
==> dyno-1284675.log (crash) <==
/disk1/home/slugs/181380_0fa1c59_dfd1-7eadaa54-533c-4617-b1de-bf74852a7afe/mnt/config/../vendor/rails/railties/lib/initializer.rb:271:in `require_frameworks': can't activate rack (~> 1.0.0, runtime) for [], already activated rack-1.1.0 for ["thin-1.2.6"] (RuntimeError)
from /disk1/home/slugs/181380_0fa1c59_dfd1-7eadaa54-533c-4617-b1de-bf74852a7afe/mnt/config/../vendor/rails/railties/lib/initializer.rb:134:in `process'
from /disk1/home/slugs/181380_0fa1c59_dfd1-7eadaa54-533c-4617-b1de-bf74852a7afe/mnt/config/../vendor/rails/railties/lib/initializer.rb:113:in `send'
from /disk1/home/slugs/181380_0fa1c59_dfd1-7eadaa54-533c-4617-b1de-bf74852a7afe/mnt/config/../vendor/rails/railties/lib/initializer.rb:113:in `run'
from /disk1/home/slugs/181380_0fa1c59_dfd1-7eadaa54-533c-4617-b1de-bf74852a7afe/mnt/config/environment.rb:9
from /usr/ruby1.8.7/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
from /usr/ruby1.8.7/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
from /usr/ruby1.8.7/lib/ruby/gems/1.8/gems/thin-1.2.6/lib/rack/adapter/rails.rb:42:in `load_application'
from /usr/ruby1.8.7/lib/ruby/gems/1.8/gems/thin-1.2.6/lib/rack/adapter/rails.rb:23:in `initialize'
from /home/heroku_rack/heroku.ru:29:in `new'-----> Heroku receiving push
-----> Rails app detected
Compiled slug size is 15.3MB
-----> Launching.... done
from /home/heroku_rack/heroku.ru:29
from /home/slugs/181380_0fa1c59_dfd1-7eadaa54-533c-4617-b1de-bf74852a7afe/mnt/.gems/gems/rack-1.1.0/lib/rack/builder.rb:46:in `instance_eval'
from /home/slugs/181380_0fa1c59_dfd1-7eadaa54-533c-4617-b1de-bf74852a7afe/mnt/.gems/gems/rack-1.1.0/lib/rack/builder.rb:46:in `initialize'
from /home/slugs/181380_0fa1c59_dfd1-7eadaa54-533c-4617-b1de-bf74852a7afe/mnt/.gems/gems/rack-1.1.0/lib/rack/builder.rb:63:in `new'
from /home/slugs/181380_0fa1c59_dfd1-7eadaa54-533c-4617-b1de-bf74852a7afe/mnt/.gems/gems/rack-1.1.0/lib/rack/builder.rb:63:in `map'
from /home/heroku_rack/heroku.ru:18
from /home/slugs/181380_0fa1c59_dfd1-7eadaa54-533c-4617-b1de-bf74852a7afe/mnt/.gems/gems/rack-1.1.0/lib/rack/builder.rb:46:in `instance_eval'
from /home/slugs/181380_0fa1c59_dfd1-7eadaa54-533c-4617-b1de-bf74852a7afe/mnt/.gems/gems/rack-1.1.0/lib/rack/builder.rb:46:in `initialize'
from /home/heroku_rack/heroku.ru:11:in `new'
from /home/heroku_rack/heroku.ru:11
from /home/slugs/181380_0fa1c59_dfd1-7eadaa54-533c-4617-b1de-bf74852a7afe/mnt/.gems/gems/rack-1.1.0/lib/rack/builder.rb:46:in `instance_eval'
from /home/slugs/181380_0fa1c59_dfd1-7eadaa54-533c-4617-b1de-bf74852a7afe/mnt/.gems/gems/rack-1.1.0/lib/rack/builder.rb:46:in `initialize'
from /home/heroku_rack/heroku.ru:1:in `new'
from /home/heroku_rack/heroku.ru:1
-----> An error happened during the initialization of your app.
This may be due to a typo, wrong number of arguments, or calling a
function that doesn't exist.
Make sure the app is working locally in production mode, by running it
with RAILS_ENV (for Rails apps) or RACK_ENV (for Sinatra or other rack
apps) set to production. e.g. RAILS_ENV=production script/server.
Examine the backtrace above this message to debug.
==> cron-2153255.log (crash) <==
(in /disk1/home/slugs/181380_b09ba5c_aaf3-ed376a4c-936a-459f-b8c8-3111c45124e1/mnt)
config.gem: Unpacked gem CVS in vendor/gems has no specification file. Run 'rake gems:refresh_specs' to fix this.
config.gem: Unpacked gem CVS in vendor/gems not in a versioned directory. Giving up.
rake aborted!
undefined method `serve_static_assets=' for #<Rails::Configuration:0x2aec8dff9cc8>
(See full trace by running task with --trace)
-----> Your application crashed.
Examine the backtrace above this message to debug.
I want Steps to be followed while switching through database for Heroku or how to avoid the above mentioned Error.
EDITED:-
my .gems file is as follows
rails -v 2.3.8
spreadsheet --version 0.6.4
spreadsheet-excel --version 0.3.5.1
rack --version 1.1.0
money --version 2.2.0
fastercsv --version 1.5.3
xml-mapping --version 0.8.1
It gives same error when i change 'rack --version 1.1.0' ot 'rack --version 1.0.0'
Regards,
Salil Gaikwad
I don't know why but it works after comment out following line in the config/environments/production.rb
config.serve_static_assets = true
Now i want to know is comment out above line occur some problem in future? AND
what is the use of that code?

Resources