Beginners Guide to Install Discourse on Ubuntu for Development


(Hosein Naseri) #176

complete newbie here. I run this script and it fails. I’m getting this error

Error connecting to Redis on localhost:6379 (Errno::ECONNREFUSED) 2 Error connecting to Redis on localhost:6379 (Errno::ECONNREFUSED) subscribe failed,


Update: I needed to install Redis :slightly_smiling_face:
sudo apt-get install redis-server


#177

I’m having a problem with this install, especially the script in the beginning. The ruby won’t install. This happens:

Installing Ruby 2.3.4 …

rbenv: /home/silvanus/.rbenv/versions/2.3.4 already exists
continue with installation? (y/N) y
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
        LANGUAGE = (unset),
        LC_ALL = (unset),
        LC_MEASUREMENT = "en_GB.UTF-8",
        LC_PAPER = "en_GB.UTF-8",
        LC_MONETARY = "en_GB.UTF-8",
        LC_NAME = "en_GB.UTF-8",
        LC_ADDRESS = "en_GB.UTF-8",
        LC_NUMERIC = "en_GB.UTF-8",
        LC_TELEPHONE = "en_GB.UTF-8",
        LC_IDENTIFICATION = "en_GB.UTF-8",
        LC_TIME = "en_GB.UTF-8",
        LANG = "en_US.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to a fallback locale ("en_US.UTF-8").
Downloading ruby-2.3.4.tar.bz2...
-> https://cache.ruby-lang.org/pub/ruby/2.3/ruby-2.3.4.tar.bz2
Installing ruby-2.3.4...

Then it halts.


After I hit CTRL+C:

^C
BUILD FAILED (Ubuntu 17.04 using ruby-build 20170523-25-g476d09b)

Inspect or clean up the working tree at /tmp/ruby-build.20170719183102.21605
Results logged to /tmp/ruby-build.20170719183102.21605.log

Last 10 log lines:
compiling transcode.c
compiling util.c
compiling variable.c
compiling version.c
compiling compile.c
compiling debug.c
compiling iseq.c
make: *** wait: No child processes.  Stop.
make: *** Waiting for unfinished jobs....
make: *** wait: No child processes.  Stop.
failed

(Blake Erickson) #178

Is ruby already installed? What is the output of

rbenv version

#179

OK, I left it running in a screen for an hour, now it has run through.


#181
bash <(wget -qO- https://raw.githubusercontent.com/techAPJ/install-rails/master/linux)

Should i write that on the terminal? I used that command on the terminal. But nothing happened.

(OS: Ubuntu 16.04)

I changed file name like “linux.sh” and on the terminal i run that command:

./linux.sh

It working now, installing the packages.

Edit: It works great! Thank you for tutorial!


(John Prusinski) #182

Hi, I’m a complete newbie at this… it took me quite awhile to work through the steps in this post, updating bundles, etc., but I finally got everything working and entered the final command (bundle exec rails server --binding=0.0.0.0). At that point I get a bunch of output, including the error “Failed to report error: Error connecting to Redis on localhost:6379”. Any ideas what I need to do to get this working?

Thanks!

ps: This is under Ubuntu in VirtualBox on a Macbook…


(Nur) #183

I wonder what’s the username and password for admin on localhost:3000

anyone?


(Gerhard Schlager) #184

There is none until you create a user.

Afterwards you can login with the email and password you used when you created the admin.


(Tarak'ha (Sara)) #186

Something is up with @techAPJ’s script to install dependencies. I had to manually install bundler; was missing or never installed.


(Tarak'ha (Sara)) #187

New error when trying to use bundler.

$ bundle exec rake db:migrate db:test:prepare db:seed_fu
rake aborted!
ActiveRecord::NoDatabaseError: FATAL:  role "root" does not exist

I am guessing the username should be there instead of root?


(Jay Pfaffman) #188

Did you create the database?


(Tarak'ha (Sara)) #189

Yep, sure did.

$ psql -l

                                        List of databases
         Name          |   Owner   | Encoding |   Collate   |    Ctype    |   Access privileges
-----------------------+-----------+----------+-------------+-------------+-----------------------
 discourse_development | purldator | UTF8     | en_US.UTF-8 | en_US.UTF-8 |
 discourse_test        | purldator | UTF8     | en_US.UTF-8 | en_US.UTF-8 |
 postgres              | postgres  | UTF8     | en_US.UTF-8 | en_US.UTF-8 |
 template0             | postgres  | UTF8     | en_US.UTF-8 | en_US.UTF-8 | =c/postgres          +
                       |           |          |             |             | postgres=CTc/postgres
 template1             | postgres  | UTF8     | en_US.UTF-8 | en_US.UTF-8 | =c/postgres          +
                       |           |          |             |             | postgres=CTc/postgres
(5 rows)

EDIT: This may be my situation here but I have no idea how to go about fixing it; google brings up nothing in particular. I suspect my root user is postgres.

EDIT2: Here’s the entire dump of text I got below the error.

$ sudo bundle exec rake db:migrate db:test:prepare db:seed_fu
[sudo] password for purldator:
rake aborted!
ActiveRecord::NoDatabaseError: FATAL:  role "root" does not exist
/var/lib/gems/2.3.0/gems/activerecord-5.1.4/lib/active_record/connection_adapters/postgresql_adapter.rb:699:in `rescue in connect'
/var/lib/gems/2.3.0/gems/activerecord-5.1.4/lib/active_record/connection_adapters/postgresql_adapter.rb:695:in `connect'
/var/lib/gems/2.3.0/gems/activerecord-5.1.4/lib/active_record/connection_adapters/postgresql_adapter.rb:220:in `initialize'
/var/lib/gems/2.3.0/gems/activerecord-5.1.4/lib/active_record/connection_adapters/postgresql_adapter.rb:38:in `new'
/var/lib/gems/2.3.0/gems/activerecord-5.1.4/lib/active_record/connection_adapters/postgresql_adapter.rb:38:in `postgresql_connection'
/var/lib/gems/2.3.0/gems/activerecord-5.1.4/lib/active_record/connection_adapters/abstract/connection_pool.rb:759:in `new_connection'
/var/lib/gems/2.3.0/gems/activerecord-5.1.4/lib/active_record/connection_adapters/abstract/connection_pool.rb:803:in `checkout_new_connection'
/var/lib/gems/2.3.0/gems/activerecord-5.1.4/lib/active_record/connection_adapters/abstract/connection_pool.rb:782:in `try_to_checkout_new_connection'
/var/lib/gems/2.3.0/gems/activerecord-5.1.4/lib/active_record/connection_adapters/abstract/connection_pool.rb:743:in `acquire_connection'
/var/lib/gems/2.3.0/gems/activerecord-5.1.4/lib/active_record/connection_adapters/abstract/connection_pool.rb:500:in `checkout'
/var/lib/gems/2.3.0/gems/activerecord-5.1.4/lib/active_record/connection_adapters/abstract/connection_pool.rb:374:in `connection'
/var/lib/gems/2.3.0/gems/activerecord-5.1.4/lib/active_record/connection_adapters/abstract/connection_pool.rb:931:in `retrieve_connection'
/var/lib/gems/2.3.0/gems/activerecord-5.1.4/lib/active_record/connection_handling.rb:116:in `retrieve_connection'
/var/lib/gems/2.3.0/gems/activerecord-5.1.4/lib/active_record/connection_handling.rb:88:in `connection'
/home/purldator/discourse/lib/site_settings/db_provider.rb:62:in `table_exists?'
/home/purldator/discourse/lib/site_settings/db_provider.rb:21:in `find'
/home/purldator/discourse/lib/site_settings/defaults_provider.rb:109:in `block in refresh_site_locale!'
/var/lib/gems/2.3.0/gems/rails_multisite-1.1.0.rc4/lib/rails_multisite/connection_management.rb:126:in `block in each_connection'
/var/lib/gems/2.3.0/gems/rails_multisite-1.1.0.rc4/lib/rails_multisite/connection_management.rb:124:in `each'
/var/lib/gems/2.3.0/gems/rails_multisite-1.1.0.rc4/lib/rails_multisite/connection_management.rb:124:in `each_connection'
/home/purldator/discourse/lib/site_settings/defaults_provider.rb:103:in `refresh_site_locale!'
/home/purldator/discourse/lib/site_settings/defaults_provider.rb:20:in `initialize'
/home/purldator/discourse/lib/site_setting_extension.rb:35:in `new'
/home/purldator/discourse/lib/site_setting_extension.rb:35:in `defaults'
/home/purldator/discourse/lib/site_setting_extension.rb:72:in `block in setting'
/home/purldator/discourse/lib/site_setting_extension.rb:71:in `synchronize'
/home/purldator/discourse/lib/site_setting_extension.rb:71:in `setting'
/home/purldator/discourse/app/models/site_setting.rb:17:in `block in load_settings'
/home/purldator/discourse/lib/site_settings/yaml_loader.rb:25:in `block (2 levels) in load'
/home/purldator/discourse/lib/site_settings/yaml_loader.rb:11:in `each'
/home/purldator/discourse/lib/site_settings/yaml_loader.rb:11:in `block in load'
/home/purldator/discourse/lib/site_settings/yaml_loader.rb:10:in `each_key'
/home/purldator/discourse/lib/site_settings/yaml_loader.rb:10:in `load'
/home/purldator/discourse/app/models/site_setting.rb:16:in `load_settings'
/home/purldator/discourse/app/models/site_setting.rb:21:in `<class:SiteSetting>'
/home/purldator/discourse/app/models/site_setting.rb:4:in `<main>'
/var/lib/gems/2.3.0/gems/bootsnap-1.0.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:63:in `load'
/var/lib/gems/2.3.0/gems/bootsnap-1.0.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:63:in `load'
/var/lib/gems/2.3.0/gems/activesupport-5.1.4/lib/active_support/dependencies.rb:476:in `block in load_file'
/var/lib/gems/2.3.0/gems/activesupport-5.1.4/lib/active_support/dependencies.rb:661:in `new_constants_in'
/var/lib/gems/2.3.0/gems/activesupport-5.1.4/lib/active_support/dependencies.rb:475:in `load_file'
/var/lib/gems/2.3.0/gems/activesupport-5.1.4/lib/active_support/dependencies.rb:374:in `block in require_or_load'
/var/lib/gems/2.3.0/gems/activesupport-5.1.4/lib/active_support/dependencies.rb:36:in `block in load_interlock'
/var/lib/gems/2.3.0/gems/activesupport-5.1.4/lib/active_support/dependencies/interlock.rb:12:in `block in loading'
/var/lib/gems/2.3.0/gems/activesupport-5.1.4/lib/active_support/concurrency/share_lock.rb:149:in `exclusive'
/var/lib/gems/2.3.0/gems/activesupport-5.1.4/lib/active_support/dependencies/interlock.rb:11:in `loading'
/var/lib/gems/2.3.0/gems/activesupport-5.1.4/lib/active_support/dependencies.rb:36:in `load_interlock'
/var/lib/gems/2.3.0/gems/activesupport-5.1.4/lib/active_support/dependencies.rb:357:in `require_or_load'
/var/lib/gems/2.3.0/gems/activesupport-5.1.4/lib/active_support/dependencies.rb:510:in `load_missing_constant'
/var/lib/gems/2.3.0/gems/bootsnap-1.0.0/lib/bootsnap/load_path_cache/core_ext/active_support.rb:53:in `block in load_missing_constant'
/var/lib/gems/2.3.0/gems/bootsnap-1.0.0/lib/bootsnap/load_path_cache/core_ext/active_support.rb:6:in `with_bootsnap_fallback'
/var/lib/gems/2.3.0/gems/bootsnap-1.0.0/lib/bootsnap/load_path_cache/core_ext/active_support.rb:53:in `load_missing_constant'
/var/lib/gems/2.3.0/gems/activesupport-5.1.4/lib/active_support/dependencies.rb:202:in `const_missing'
/home/purldator/discourse/config/initializers/004-message_bus.rb:84:in `<main>'
/var/lib/gems/2.3.0/gems/bootsnap-1.0.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `load'
/var/lib/gems/2.3.0/gems/bootsnap-1.0.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `load'
/var/lib/gems/2.3.0/gems/activesupport-5.1.4/lib/active_support/dependencies.rb:286:in `block in load'
/var/lib/gems/2.3.0/gems/activesupport-5.1.4/lib/active_support/dependencies.rb:258:in `load_dependency'
/var/lib/gems/2.3.0/gems/activesupport-5.1.4/lib/active_support/dependencies.rb:286:in `load'
/var/lib/gems/2.3.0/gems/railties-5.1.4/lib/rails/engine.rb:655:in `block in load_config_initializer'
/var/lib/gems/2.3.0/gems/activesupport-5.1.4/lib/active_support/notifications.rb:168:in `instrument'
/var/lib/gems/2.3.0/gems/railties-5.1.4/lib/rails/engine.rb:654:in `load_config_initializer'
/var/lib/gems/2.3.0/gems/railties-5.1.4/lib/rails/engine.rb:612:in `block (2 levels) in <class:Engine>'
/var/lib/gems/2.3.0/gems/railties-5.1.4/lib/rails/engine.rb:611:in `each'
/var/lib/gems/2.3.0/gems/railties-5.1.4/lib/rails/engine.rb:611:in `block in <class:Engine>'
/var/lib/gems/2.3.0/gems/railties-5.1.4/lib/rails/initializable.rb:30:in `instance_exec'
/var/lib/gems/2.3.0/gems/railties-5.1.4/lib/rails/initializable.rb:30:in `run'
/var/lib/gems/2.3.0/gems/railties-5.1.4/lib/rails/initializable.rb:59:in `block in run_initializers'
/var/lib/gems/2.3.0/gems/railties-5.1.4/lib/rails/initializable.rb:48:in `each'
/var/lib/gems/2.3.0/gems/railties-5.1.4/lib/rails/initializable.rb:48:in `tsort_each_child'
/var/lib/gems/2.3.0/gems/railties-5.1.4/lib/rails/initializable.rb:58:in `run_initializers'
/var/lib/gems/2.3.0/gems/railties-5.1.4/lib/rails/application.rb:353:in `initialize!'
/var/lib/gems/2.3.0/gems/railties-5.1.4/lib/rails/railtie.rb:185:in `public_send'
/var/lib/gems/2.3.0/gems/railties-5.1.4/lib/rails/railtie.rb:185:in `method_missing'
/home/purldator/discourse/config/environment.rb:5:in `<main>'
/var/lib/gems/2.3.0/gems/bootsnap-1.0.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:17:in `require'
/var/lib/gems/2.3.0/gems/bootsnap-1.0.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:17:in `require'
/var/lib/gems/2.3.0/gems/activesupport-5.1.4/lib/active_support/dependencies.rb:292:in `block in require'
/var/lib/gems/2.3.0/gems/activesupport-5.1.4/lib/active_support/dependencies.rb:258:in `load_dependency'
/var/lib/gems/2.3.0/gems/activesupport-5.1.4/lib/active_support/dependencies.rb:292:in `require'
/var/lib/gems/2.3.0/gems/railties-5.1.4/lib/rails/application.rb:329:in `require_environment!'
/var/lib/gems/2.3.0/gems/railties-5.1.4/lib/rails/application.rb:445:in `block in run_tasks_blocks'
/var/lib/gems/2.3.0/gems/rake-12.1.0/exe/rake:27:in `<top (required)>'
PG::ConnectionBad: FATAL:  role "root" does not exist
/var/lib/gems/2.3.0/gems/pg-0.20.0/lib/pg.rb:56:in `initialize'
/var/lib/gems/2.3.0/gems/pg-0.20.0/lib/pg.rb:56:in `new'
/var/lib/gems/2.3.0/gems/pg-0.20.0/lib/pg.rb:56:in `connect'
/var/lib/gems/2.3.0/gems/activerecord-5.1.4/lib/active_record/connection_adapters/postgresql_adapter.rb:695:in `connect'
/var/lib/gems/2.3.0/gems/activerecord-5.1.4/lib/active_record/connection_adapters/postgresql_adapter.rb:220:in `initialize'
/var/lib/gems/2.3.0/gems/activerecord-5.1.4/lib/active_record/connection_adapters/postgresql_adapter.rb:38:in `new'
/var/lib/gems/2.3.0/gems/activerecord-5.1.4/lib/active_record/connection_adapters/postgresql_adapter.rb:38:in `postgresql_connection'
/var/lib/gems/2.3.0/gems/activerecord-5.1.4/lib/active_record/connection_adapters/abstract/connection_pool.rb:759:in `new_connection'
/var/lib/gems/2.3.0/gems/activerecord-5.1.4/lib/active_record/connection_adapters/abstract/connection_pool.rb:803:in `checkout_new_connection'
/var/lib/gems/2.3.0/gems/activerecord-5.1.4/lib/active_record/connection_adapters/abstract/connection_pool.rb:782:in `try_to_checkout_new_connection'
/var/lib/gems/2.3.0/gems/activerecord-5.1.4/lib/active_record/connection_adapters/abstract/connection_pool.rb:743:in `acquire_connection'
/var/lib/gems/2.3.0/gems/activerecord-5.1.4/lib/active_record/connection_adapters/abstract/connection_pool.rb:500:in `checkout'
/var/lib/gems/2.3.0/gems/activerecord-5.1.4/lib/active_record/connection_adapters/abstract/connection_pool.rb:374:in `connection'
/var/lib/gems/2.3.0/gems/activerecord-5.1.4/lib/active_record/connection_adapters/abstract/connection_pool.rb:931:in `retrieve_connection'
/var/lib/gems/2.3.0/gems/activerecord-5.1.4/lib/active_record/connection_handling.rb:116:in `retrieve_connection'
/var/lib/gems/2.3.0/gems/activerecord-5.1.4/lib/active_record/connection_handling.rb:88:in `connection'
/home/purldator/discourse/lib/site_settings/db_provider.rb:62:in `table_exists?'
/home/purldator/discourse/lib/site_settings/db_provider.rb:21:in `find'
/home/purldator/discourse/lib/site_settings/defaults_provider.rb:109:in `block in refresh_site_locale!'
/var/lib/gems/2.3.0/gems/rails_multisite-1.1.0.rc4/lib/rails_multisite/connection_management.rb:126:in `block in each_connection'
/var/lib/gems/2.3.0/gems/rails_multisite-1.1.0.rc4/lib/rails_multisite/connection_management.rb:124:in `each'
/var/lib/gems/2.3.0/gems/rails_multisite-1.1.0.rc4/lib/rails_multisite/connection_management.rb:124:in `each_connection'
/home/purldator/discourse/lib/site_settings/defaults_provider.rb:103:in `refresh_site_locale!'
/home/purldator/discourse/lib/site_settings/defaults_provider.rb:20:in `initialize'
/home/purldator/discourse/lib/site_setting_extension.rb:35:in `new'
/home/purldator/discourse/lib/site_setting_extension.rb:35:in `defaults'
/home/purldator/discourse/lib/site_setting_extension.rb:72:in `block in setting'
/home/purldator/discourse/lib/site_setting_extension.rb:71:in `synchronize'
/home/purldator/discourse/lib/site_setting_extension.rb:71:in `setting'
/home/purldator/discourse/app/models/site_setting.rb:17:in `block in load_settings'
/home/purldator/discourse/lib/site_settings/yaml_loader.rb:25:in `block (2 levels) in load'
/home/purldator/discourse/lib/site_settings/yaml_loader.rb:11:in `each'
/home/purldator/discourse/lib/site_settings/yaml_loader.rb:11:in `block in load'
/home/purldator/discourse/lib/site_settings/yaml_loader.rb:10:in `each_key'
/home/purldator/discourse/lib/site_settings/yaml_loader.rb:10:in `load'
/home/purldator/discourse/app/models/site_setting.rb:16:in `load_settings'
/home/purldator/discourse/app/models/site_setting.rb:21:in `<class:SiteSetting>'
/home/purldator/discourse/app/models/site_setting.rb:4:in `<main>'
/var/lib/gems/2.3.0/gems/bootsnap-1.0.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:63:in `load'
/var/lib/gems/2.3.0/gems/bootsnap-1.0.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:63:in `load'
/var/lib/gems/2.3.0/gems/activesupport-5.1.4/lib/active_support/dependencies.rb:476:in `block in load_file'
/var/lib/gems/2.3.0/gems/activesupport-5.1.4/lib/active_support/dependencies.rb:661:in `new_constants_in'
/var/lib/gems/2.3.0/gems/activesupport-5.1.4/lib/active_support/dependencies.rb:475:in `load_file'
/var/lib/gems/2.3.0/gems/activesupport-5.1.4/lib/active_support/dependencies.rb:374:in `block in require_or_load'
/var/lib/gems/2.3.0/gems/activesupport-5.1.4/lib/active_support/dependencies.rb:36:in `block in load_interlock'
/var/lib/gems/2.3.0/gems/activesupport-5.1.4/lib/active_support/dependencies/interlock.rb:12:in `block in loading'
/var/lib/gems/2.3.0/gems/activesupport-5.1.4/lib/active_support/concurrency/share_lock.rb:149:in `exclusive'
/var/lib/gems/2.3.0/gems/activesupport-5.1.4/lib/active_support/dependencies/interlock.rb:11:in `loading'
/var/lib/gems/2.3.0/gems/activesupport-5.1.4/lib/active_support/dependencies.rb:36:in `load_interlock'
/var/lib/gems/2.3.0/gems/activesupport-5.1.4/lib/active_support/dependencies.rb:357:in `require_or_load'
/var/lib/gems/2.3.0/gems/activesupport-5.1.4/lib/active_support/dependencies.rb:510:in `load_missing_constant'
/var/lib/gems/2.3.0/gems/bootsnap-1.0.0/lib/bootsnap/load_path_cache/core_ext/active_support.rb:53:in `block in load_missing_constant'
/var/lib/gems/2.3.0/gems/bootsnap-1.0.0/lib/bootsnap/load_path_cache/core_ext/active_support.rb:6:in `with_bootsnap_fallback'
/var/lib/gems/2.3.0/gems/bootsnap-1.0.0/lib/bootsnap/load_path_cache/core_ext/active_support.rb:53:in `load_missing_constant'
/var/lib/gems/2.3.0/gems/activesupport-5.1.4/lib/active_support/dependencies.rb:202:in `const_missing'
/home/purldator/discourse/config/initializers/004-message_bus.rb:84:in `<main>'
/var/lib/gems/2.3.0/gems/bootsnap-1.0.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `load'
/var/lib/gems/2.3.0/gems/bootsnap-1.0.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `load'
/var/lib/gems/2.3.0/gems/activesupport-5.1.4/lib/active_support/dependencies.rb:286:in `block in load'
/var/lib/gems/2.3.0/gems/activesupport-5.1.4/lib/active_support/dependencies.rb:258:in `load_dependency'
/var/lib/gems/2.3.0/gems/activesupport-5.1.4/lib/active_support/dependencies.rb:286:in `load'
/var/lib/gems/2.3.0/gems/railties-5.1.4/lib/rails/engine.rb:655:in `block in load_config_initializer'
/var/lib/gems/2.3.0/gems/activesupport-5.1.4/lib/active_support/notifications.rb:168:in `instrument'
/var/lib/gems/2.3.0/gems/railties-5.1.4/lib/rails/engine.rb:654:in `load_config_initializer'
/var/lib/gems/2.3.0/gems/railties-5.1.4/lib/rails/engine.rb:612:in `block (2 levels) in <class:Engine>'
/var/lib/gems/2.3.0/gems/railties-5.1.4/lib/rails/engine.rb:611:in `each'
/var/lib/gems/2.3.0/gems/railties-5.1.4/lib/rails/engine.rb:611:in `block in <class:Engine>'
/var/lib/gems/2.3.0/gems/railties-5.1.4/lib/rails/initializable.rb:30:in `instance_exec'
/var/lib/gems/2.3.0/gems/railties-5.1.4/lib/rails/initializable.rb:30:in `run'
/var/lib/gems/2.3.0/gems/railties-5.1.4/lib/rails/initializable.rb:59:in `block in run_initializers'
/var/lib/gems/2.3.0/gems/railties-5.1.4/lib/rails/initializable.rb:48:in `each'
/var/lib/gems/2.3.0/gems/railties-5.1.4/lib/rails/initializable.rb:48:in `tsort_each_child'
/var/lib/gems/2.3.0/gems/railties-5.1.4/lib/rails/initializable.rb:58:in `run_initializers'
/var/lib/gems/2.3.0/gems/railties-5.1.4/lib/rails/application.rb:353:in `initialize!'
/var/lib/gems/2.3.0/gems/railties-5.1.4/lib/rails/railtie.rb:185:in `public_send'
/var/lib/gems/2.3.0/gems/railties-5.1.4/lib/rails/railtie.rb:185:in `method_missing'
/home/purldator/discourse/config/environment.rb:5:in `<main>'
/var/lib/gems/2.3.0/gems/bootsnap-1.0.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:17:in `require'
/var/lib/gems/2.3.0/gems/bootsnap-1.0.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:17:in `require'
/var/lib/gems/2.3.0/gems/activesupport-5.1.4/lib/active_support/dependencies.rb:292:in `block in require'
/var/lib/gems/2.3.0/gems/activesupport-5.1.4/lib/active_support/dependencies.rb:258:in `load_dependency'
/var/lib/gems/2.3.0/gems/activesupport-5.1.4/lib/active_support/dependencies.rb:292:in `require'
/var/lib/gems/2.3.0/gems/railties-5.1.4/lib/rails/application.rb:329:in `require_environment!'
/var/lib/gems/2.3.0/gems/railties-5.1.4/lib/rails/application.rb:445:in `block in run_tasks_blocks'
/var/lib/gems/2.3.0/gems/rake-12.1.0/exe/rake:27:in `<top (required)>'
Tasks: TOP => db:migrate => environment
(See full trace by running task with --trace)

Got it to work by giving in and creating a root role.


(Jeff Wong) #190

That would explain why you needed a root user - you shouldn’t need to sudo to run the bundler commands, otherwise the user is root.

You might need to change your permissions in your discourse project back to your non-root user, too, or re-clone the DB again without sudo.


(Tarak'ha (Sara)) #191

I have no clue how it drifted. Yes, as of right now root owns /discourse in my home folder. I followed the instructions perfectly so I have no idea where it went from point p to point r, as it were.


(Jeff Wong) #192

I’ve seen stranger things; could have been that you were cloning and setting up the env in a terminal after running sudo su or something of that nature.

If you wanted to get out of root, depending on how far along you are, it’s probably safe and pretty quick to re-clone.


(Quim Gil) #193

I have followed the steps from scratch twice, and I get stuck in the same point. Can you help me, please?

qgil@minitux:~/discourse$ bundle exec rake db:migrate db:test:prepare db:seed_fu/home/qgil/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/i18n-0.8.6/lib/i18n.rb:12: warning: already initialized constant I18n::RESERVED_KEYS
/home/qgil/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/i18n-0.8.6/lib/i18n.rb:12: warning: previous definition of RESERVED_KEYS was here
/home/qgil/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/i18n-0.8.6/lib/i18n.rb:13: warning: already initialized constant I18n::RESERVED_KEYS_PATTERN
/home/qgil/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/i18n-0.8.6/lib/i18n.rb:13: warning: previous definition of RESERVED_KEYS_PATTERN was here

== Seed from /home/qgil/discourse/db/fixtures/001_categories.rb

== Seed from /home/qgil/discourse/db/fixtures/002_groups.rb

== Seed from /home/qgil/discourse/db/fixtures/003_post_action_types.rb
 - PostActionType {:id=>1, :name_key=>"bookmark", :is_flag=>false, :position=>1}
rake aborted!
ActiveRecord::StatementInvalid: PG::UndefinedColumn: ERROR:  column "increment_by" does not exist
LINE 1: ...types_id_seq', (SELECT GREATEST(MAX("id")+(SELECT increment_...
                                                             ^
:             SELECT setval('public.post_action_types_id_seq', (SELECT GREATEST(MAX("id")+(SELECT increment_by FROM public.post_action_types_id_seq), (SELECT min_value FROM public.post_action_types_id_seq)) FROM "post_action_types"), false)
(eval):1:in `block (2 levels) in run_file'
/home/qgil/discourse/lib/tasks/db.rake:30:in `block in <main>'
/home/qgil/.rbenv/versions/2.4.2/bin/bundle:23:in `load'
/home/qgil/.rbenv/versions/2.4.2/bin/bundle:23:in `<main>'
PG::UndefinedColumn: ERROR:  column "increment_by" does not exist
LINE 1: ...types_id_seq', (SELECT GREATEST(MAX("id")+(SELECT increment_...
                                                             ^
(eval):1:in `block (2 levels) in run_file'
/home/qgil/discourse/lib/tasks/db.rake:30:in `block in <main>'
/home/qgil/.rbenv/versions/2.4.2/bin/bundle:23:in `load'
/home/qgil/.rbenv/versions/2.4.2/bin/bundle:23:in `<main>'
Tasks: TOP => db:migrate
(See full trace by running task with --trace)

[PAID] Adding Catalan files to Discourse upstream
Catalan translation
(Jay Pfaffman) #194

What OS are you using?


(Quim Gil) #195

Good point. Debian testing. I thought this would be fine after reading


#197

getting the following error:

UNAME_MACHINE = aarch64
UNAME_RELEASE = 4.4.114-mainline-rev1
UNAME_SYSTEM  = Linux
UNAME_VERSION = #1 SMP Thu Feb 1 16:23:12 UTC 2018
configure: error: cannot guess build type; you must specify one

libffi.mk:6: recipe for target
'"/root/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/ffi-1.9.18/ext/ffi_c/libffi-aarch64-linux"/.libs/libffi_convenience.a'
failed
make: ***
["/root/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/ffi-1.9.18/ext/ffi_c/libffi-aarch64-linux"/.libs/libffi_convenience.a]
Error 1

make failed, exit code 2

I guess its not recognising the release number?

also, by using ‘root’ user am I going to break this?

EDIT: I’ve rebuilt on an x86 machine and having no issues so seems like an ARM VPS version issue. If anyone knows how to fix this it would make the choice of server a little more flexible …


#198

I got this message, should i overwrite? Ubuntu 16.04.3

Installing Bundler …

Fetching: bundler-1.16.1.gem (100%)
bundler’s executable “bundle” conflicts with /home/discourse/.rbenv/versions/2.4.2/bin/bundle
Overwrite the executable? [yN]