Bundle exec rake db:migrate rake aborted! LoadError: cannot load such file -- memory_profiler after upgrade (fixed)


(Daniel) #1

Hi,

i upgraded docker and postgresql on my debian machine:

# >apt-get dist-upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
The following packages will be REMOVED:
  lxc-docker-1.7.1
The following NEW packages will be installed:
  libclamav7 libsensors4 lxc-docker-1.9.1 postgresql-9.5 postgresql-client-9.5 postgresql-contrib-9.5 sysstat
The following packages will be upgraded:
  clamav clamav-base clamav-daemon clamav-freshclam lxc-docker postgresql postgresql-9.4 postgresql-contrib postgresql-contrib-9.4
9 upgraded, 7 newly installed, 1 to remove and 0 not upgraded.
Need to get 25.4 MB of archives.
After this operation, 43.7 MB of additional disk space will be used.
Do you want to continue [Y/n]? y

all 3 postgresql versions are running:

# >/etc/init.d/postgresql restart
[ ok ] Restarting PostgreSQL 9.3 database server: main.
[ ok ] Restarting PostgreSQL 9.4 database server: main.
[ ok ] Restarting PostgreSQL 9.5 database server: main.

but now i can not rebuild the app:

root@/var/discourse:
# >./launcher rebuild app
fatal: ambiguous argument '@': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions
fatal: Not a valid object name @
./launcher: line 607: [: @: unary operator expected
./launcher: line 612: [: f52572a5cfc988130a0cb46859970a0b76125bf5: unary operator expected
From https://github.com/SamSaffron/pups
   d72d1f3..2b8776d  master     -> origin/master
 * [new tag]         v1.0.0     -> v1.0.0
 * [new tag]         v1.0.1     -> v1.0.1
I, [2016-07-06T22:20:40.665311 #43]  INFO -- : Loading --stdin
I, [2016-07-06T22:20:40.671723 #43]  INFO -- : File > /etc/service/redis/run  chmod: +x
I, [2016-07-06T22:20:40.674754 #43]  INFO -- : File > /etc/runit/3.d/10-redis  chmod: +x
I, [2016-07-06T22:20:40.674893 #43]  INFO -- : Replacing daemonize yes with  in /etc/redis/redis.conf
I, [2016-07-06T22:20:40.696628 #43]  INFO -- : Replacing (?-mix:^pidfile.*$) with  in /etc/redis/redis.conf
I, [2016-07-06T22:20:40.699924 #43]  INFO -- : > install -d -m 0755 -o redis -g redis /shared/redis_data
I, [2016-07-06T22:20:40.701406 #43]  INFO -- :
I, [2016-07-06T22:20:40.701592 #43]  INFO -- : Replacing (?-mix:^logfile.*$) with logfile "" in /etc/redis/redis.conf
I, [2016-07-06T22:20:40.702006 #43]  INFO -- : Replacing (?-mix:^dir .*$) with dir /shared/redis_data in /etc/redis/redis.conf
I, [2016-07-06T22:20:40.702603 #43]  INFO -- : > echo redis installed
I, [2016-07-06T22:20:40.703762 #43]  INFO -- : redis installed

[...]

Installing ember-rails 0.18.5
0:  ember-rails (0.18.5) from /var/www/discourse/vendor/bundle/ruby/2.0.0/specifications/ember-rails-0.18.5.gemspec
Using spork-rails 4.0.0
0:  spork-rails (4.0.0) from /var/www/discourse/vendor/bundle/ruby/2.0.0/specifications/spork-rails-4.0.0.gemspec
Bundle complete! 99 Gemfile dependencies, 178 gems now installed.
Gems in the group development were not installed.
Bundled gems are installed into ./vendor/bundle.

I, [2016-07-06T22:23:43.344125 #43]  INFO -- : > cd /var/www/discourse && su discourse -c 'bundle exec rake db:migrate'
rake aborted!
LoadError: cannot load such file -- memory_profiler
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activesupport-4.2.6/lib/active_support/dependencies.rb:274:in `require'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activesupport-4.2.6/lib/active_support/dependencies.rb:274:in `block in require'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activesupport-4.2.6/lib/active_support/dependencies.rb:240:in `load_dependency'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activesupport-4.2.6/lib/active_support/dependencies.rb:274:in `require'
/var/www/discourse/config/initializers/006-mini_profiler.rb:7:in `<top (required)>'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activesupport-4.2.6/lib/active_support/dependencies.rb:268:in `load'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activesupport-4.2.6/lib/active_support/dependencies.rb:268:in `block in load'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activesupport-4.2.6/lib/active_support/dependencies.rb:240:in `load_dependency'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activesupport-4.2.6/lib/active_support/dependencies.rb:268:in `load'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/railties-4.2.6/lib/rails/engine.rb:652:in `block in load_config_initializer'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activesupport-4.2.6/lib/active_support/notifications.rb:166:in `instrument'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/railties-4.2.6/lib/rails/engine.rb:651:in `load_config_initializer'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/railties-4.2.6/lib/rails/engine.rb:616:in `block (2 levels) in <class:Engine>'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/railties-4.2.6/lib/rails/engine.rb:615:in `each'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/railties-4.2.6/lib/rails/engine.rb:615:in `block in <class:Engine>'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/railties-4.2.6/lib/rails/initializable.rb:30:in `instance_exec'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/railties-4.2.6/lib/rails/initializable.rb:30:in `run'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/railties-4.2.6/lib/rails/initializable.rb:55:in `block in run_initializers'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/railties-4.2.6/lib/rails/initializable.rb:44:in `each'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/railties-4.2.6/lib/rails/initializable.rb:44:in `tsort_each_child'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/railties-4.2.6/lib/rails/initializable.rb:54:in `run_initializers'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/railties-4.2.6/lib/rails/application.rb:352:in `initialize!'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/railties-4.2.6/lib/rails/railtie.rb:194:in `public_send'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/railties-4.2.6/lib/rails/railtie.rb:194:in `method_missing'
/var/www/discourse/config/environment.rb:5:in `<top (required)>'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activesupport-4.2.6/lib/active_support/dependencies.rb:274:in `require'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activesupport-4.2.6/lib/active_support/dependencies.rb:274:in `block in require'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activesupport-4.2.6/lib/active_support/dependencies.rb:240:in `load_dependency'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activesupport-4.2.6/lib/active_support/dependencies.rb:274:in `require'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/railties-4.2.6/lib/rails/application.rb:328:in `require_environment!'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/railties-4.2.6/lib/rails/application.rb:457:in `block in run_tasks_blocks'
/usr/local/bin/bundle:23:in `load'
/usr/local/bin/bundle:23:in `<main>'
Tasks: TOP => db:migrate => environment
(See full trace by running task with --trace)
I, [2016-07-06T22:23:46.212874 #43]  INFO -- :
I, [2016-07-06T22:23:46.213112 #43]  INFO -- : Terminating async processes
I, [2016-07-06T22:23:46.213154 #43]  INFO -- : Sending INT to HOME=/var/lib/postgresql USER=postgres exec chpst -u postgres:postgres:ssl-cert -U postgres:postgres:ssl-cert /usr/lib/postgresql/9.3/bin/postmaster -D /etc/postgresql/9.3/main pid: 78
I, [2016-07-06T22:23:46.213180 #43]  INFO -- : Sending TERM to exec chpst -u redis -U redis /usr/bin/redis-server /etc/redis/redis.conf pid: 200
2016-07-06 22:23:46 UTC [78-2] LOG:  received fast shutdown request
2016-07-06 22:23:46 UTC [78-3] LOG:  aborting any active transactions
2016-07-06 22:23:46 UTC [85-2] LOG:  autovacuum launcher shutting down
2016-07-06 22:23:46 UTC [82-1] LOG:  shutting down
2016-07-06 22:23:46 UTC [82-2] LOG:  database system is shut down
root@/var/discourse:
# >

complete log: discourse rebuild - Pastebin.com

i also tried β€œ./launcher cleanup” before rebuild app.

Im not the docker/ruby master. :frowning:

What can i check? What is the problem?

greets,
Daniel


Rake aborted message is showing when installing vagrant development
(Rafael dos Santos Silva) #2

You are running an old image. Try the git pull before rebuild.


(Daniel) #3

Big thanks @Falco - its back running!

the solution:

git pull origin master
./launcher cleanup
./launcher rebuild app
./launcher rebuild app

Have a good day!

best regards,
Daniel