Beginners Guide to Install Discourse on macOS for Development


(jordi) #132

Hi everyone,

I just installed Discourse and when I run rails db:migrate I get the following error:

MiniRacer::RuntimeError: ReferenceError: setTimeout is not defined

I could not find any help from this gem. Any ideas?

Many thanks,

Jordi


Error on Fresh install: MiniRacer::RuntimeError: ReferenceError: setTimeout is not defined
(Sam Saffron) #133

hmmm never seen this before, do you have any plugins installed.


(Minsik Yoon) #134

Could you fix this error?
same error occurred to me…

after upgrading discourse version 1.9.
When I visit home page I can see this error at chrome console.


(Henrik Berg) #135

@techAPJ, whenever I try to run the bundle exec rails server command in terminal to start my localhost Discourse, it results in an error:

rbenv: rails: command not found

The 'rails' command exists in these Ruby versions:
  2.3.3
  2.3.0

Is there an alternative for Ruby version 2.3.4 (version that was installed with your script)?


(Sam Saffron) #136

That indicates you don’t have the bundle installed in the particular version of Ruby.

Try typing bundle install first.


(Henrik Berg) #137

Thank you! That resolved the issue.

However, whenever I run bundle exec rails server after running bundle install, it returns a long, ugly error:

Henriks-MacBook-Air:Discourse Henrik$ bundle exec rails server
=> Booting Puma
=> Rails 4.2.9 application starting in development on http://localhost:3000
=> Run `rails server -h` for more startup options
=> Ctrl-C to shutdown server
Starting CSS change watcher
Exiting
/Users/Henrik/.rbenv/versions/2.3.4/lib/ruby/gems/2.3.0/gems/activerecord-4.2.9/lib/active_record/connection_adapters/postgresql_adapter.rb:651:in `initialize': could not connect to server: No such file or directory (PG::ConnectionBad)
	Is the server running locally and accepting
	connections on Unix domain socket "/tmp/.s.PGSQL.5432"?
	from /Users/Henrik/.rbenv/versions/2.3.4/lib/ruby/gems/2.3.0/gems/activerecord-4.2.9/lib/active_record/connection_adapters/postgresql_adapter.rb:651:in `new'
	from /Users/Henrik/.rbenv/versions/2.3.4/lib/ruby/gems/2.3.0/gems/activerecord-4.2.9/lib/active_record/connection_adapters/postgresql_adapter.rb:651:in `connect'
	from /Users/Henrik/.rbenv/versions/2.3.4/lib/ruby/gems/2.3.0/gems/activerecord-4.2.9/lib/active_record/connection_adapters/postgresql_adapter.rb:242:in `initialize'
	from /Users/Henrik/.rbenv/versions/2.3.4/lib/ruby/gems/2.3.0/gems/activerecord-4.2.9/lib/active_record/connection_adapters/postgresql_adapter.rb:44:in `new'
	from /Users/Henrik/.rbenv/versions/2.3.4/lib/ruby/gems/2.3.0/gems/activerecord-4.2.9/lib/active_record/connection_adapters/postgresql_adapter.rb:44:in `postgresql_connection'
	from /Users/Henrik/.rbenv/versions/2.3.4/lib/ruby/gems/2.3.0/gems/activerecord-4.2.9/lib/active_record/connection_adapters/abstract/connection_pool.rb:438:in `new_connection'
	from /Users/Henrik/.rbenv/versions/2.3.4/lib/ruby/gems/2.3.0/gems/activerecord-4.2.9/lib/active_record/connection_adapters/abstract/connection_pool.rb:448:in `checkout_new_connection'
	from /Users/Henrik/.rbenv/versions/2.3.4/lib/ruby/gems/2.3.0/gems/activerecord-4.2.9/lib/active_record/connection_adapters/abstract/connection_pool.rb:422:in `acquire_connection'
	from /Users/Henrik/.rbenv/versions/2.3.4/lib/ruby/gems/2.3.0/gems/activerecord-4.2.9/lib/active_record/connection_adapters/abstract/connection_pool.rb:349:in `block in checkout'
	from /Users/Henrik/.rbenv/versions/2.3.4/lib/ruby/2.3.0/monitor.rb:214:in `mon_synchronize'
	from /Users/Henrik/.rbenv/versions/2.3.4/lib/ruby/gems/2.3.0/gems/activerecord-4.2.9/lib/active_record/connection_adapters/abstract/connection_pool.rb:348:in `checkout'
	from /Users/Henrik/.rbenv/versions/2.3.4/lib/ruby/gems/2.3.0/gems/activerecord-4.2.9/lib/active_record/connection_adapters/abstract/connection_pool.rb:263:in `block in connection'
	from /Users/Henrik/.rbenv/versions/2.3.4/lib/ruby/2.3.0/monitor.rb:214:in `mon_synchronize'
	from /Users/Henrik/.rbenv/versions/2.3.4/lib/ruby/gems/2.3.0/gems/activerecord-4.2.9/lib/active_record/connection_adapters/abstract/connection_pool.rb:262:in `connection'
	from /Users/Henrik/.rbenv/versions/2.3.4/lib/ruby/gems/2.3.0/gems/activerecord-4.2.9/lib/active_record/connection_adapters/abstract/connection_pool.rb:571:in `retrieve_connection'
	from /Users/Henrik/.rbenv/versions/2.3.4/lib/ruby/gems/2.3.0/gems/activerecord-4.2.9/lib/active_record/connection_handling.rb:113:in `retrieve_connection'
	from /Users/Henrik/.rbenv/versions/2.3.4/lib/ruby/gems/2.3.0/gems/activerecord-4.2.9/lib/active_record/connection_handling.rb:87:in `connection'
	from /Users/Henrik/Documents/Discourse/lib/site_settings/db_provider.rb:62:in `table_exists?'
	from /Users/Henrik/Documents/Discourse/lib/site_settings/db_provider.rb:21:in `find'
	from /Users/Henrik/Documents/Discourse/lib/site_settings/defaults_provider.rb:108:in `block in refresh_site_locale!'
	from /Users/Henrik/.rbenv/versions/2.3.4/lib/ruby/gems/2.3.0/gems/rails_multisite-1.0.6/lib/rails_multisite/connection_management.rb:126:in `block in each_connection'
	from /Users/Henrik/.rbenv/versions/2.3.4/lib/ruby/gems/2.3.0/gems/rails_multisite-1.0.6/lib/rails_multisite/connection_management.rb:124:in `each'
	from /Users/Henrik/.rbenv/versions/2.3.4/lib/ruby/gems/2.3.0/gems/rails_multisite-1.0.6/lib/rails_multisite/connection_management.rb:124:in `each_connection'
	from /Users/Henrik/Documents/Discourse/lib/site_settings/defaults_provider.rb:102:in `refresh_site_locale!'
	from /Users/Henrik/Documents/Discourse/lib/site_settings/defaults_provider.rb:19:in `initialize'
	from /Users/Henrik/Documents/Discourse/lib/site_setting_extension.rb:35:in `new'
	from /Users/Henrik/Documents/Discourse/lib/site_setting_extension.rb:35:in `defaults'
	from /Users/Henrik/Documents/Discourse/lib/site_setting_extension.rb:69:in `block in setting'
	from /Users/Henrik/Documents/Discourse/lib/site_setting_extension.rb:68:in `synchronize'
	from /Users/Henrik/Documents/Discourse/lib/site_setting_extension.rb:68:in `setting'
	from /Users/Henrik/Documents/Discourse/app/models/site_setting.rb:17:in `block in load_settings'
	from /Users/Henrik/Documents/Discourse/lib/site_settings/yaml_loader.rb:25:in `block (2 levels) in load'
	from /Users/Henrik/Documents/Discourse/lib/site_settings/yaml_loader.rb:11:in `each'
	from /Users/Henrik/Documents/Discourse/lib/site_settings/yaml_loader.rb:11:in `block in load'
	from /Users/Henrik/Documents/Discourse/lib/site_settings/yaml_loader.rb:10:in `each_key'
	from /Users/Henrik/Documents/Discourse/lib/site_settings/yaml_loader.rb:10:in `load'
	from /Users/Henrik/Documents/Discourse/app/models/site_setting.rb:16:in `load_settings'
	from /Users/Henrik/Documents/Discourse/app/models/site_setting.rb:21:in `<class:SiteSetting>'
	from /Users/Henrik/Documents/Discourse/app/models/site_setting.rb:4:in `<main>'
	from /Users/Henrik/.rbenv/versions/2.3.4/lib/ruby/gems/2.3.0/gems/bootsnap-1.0.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:63:in `load'
	from /Users/Henrik/.rbenv/versions/2.3.4/lib/ruby/gems/2.3.0/gems/bootsnap-1.0.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:63:in `load'
	from /Users/Henrik/.rbenv/versions/2.3.4/lib/ruby/gems/2.3.0/gems/activesupport-4.2.9/lib/active_support/dependencies.rb:457:in `block in load_file'
	from /Users/Henrik/.rbenv/versions/2.3.4/lib/ruby/gems/2.3.0/gems/activesupport-4.2.9/lib/active_support/dependencies.rb:647:in `new_constants_in'
	from /Users/Henrik/.rbenv/versions/2.3.4/lib/ruby/gems/2.3.0/gems/activesupport-4.2.9/lib/active_support/dependencies.rb:456:in `load_file'
	from /Users/Henrik/.rbenv/versions/2.3.4/lib/ruby/gems/2.3.0/gems/activesupport-4.2.9/lib/active_support/dependencies.rb:354:in `require_or_load'
	from /Users/Henrik/.rbenv/versions/2.3.4/lib/ruby/gems/2.3.0/gems/activesupport-4.2.9/lib/active_support/dependencies.rb:494:in `load_missing_constant'
	from /Users/Henrik/.rbenv/versions/2.3.4/lib/ruby/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'
	from /Users/Henrik/.rbenv/versions/2.3.4/lib/ruby/gems/2.3.0/gems/bootsnap-1.0.0/lib/bootsnap/load_path_cache/core_ext/active_support.rb:6:in `with_bootsnap_fallback'
	from /Users/Henrik/.rbenv/versions/2.3.4/lib/ruby/gems/2.3.0/gems/bootsnap-1.0.0/lib/bootsnap/load_path_cache/core_ext/active_support.rb:53:in `load_missing_constant'
	from /Users/Henrik/.rbenv/versions/2.3.4/lib/ruby/gems/2.3.0/gems/activesupport-4.2.9/lib/active_support/dependencies.rb:184:in `const_missing'
	from /Users/Henrik/Documents/Discourse/config/initializers/004-message_bus.rb:84:in `<main>'
	from /Users/Henrik/.rbenv/versions/2.3.4/lib/ruby/gems/2.3.0/gems/bootsnap-1.0.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `load'
	from /Users/Henrik/.rbenv/versions/2.3.4/lib/ruby/gems/2.3.0/gems/bootsnap-1.0.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `load'
	from /Users/Henrik/.rbenv/versions/2.3.4/lib/ruby/gems/2.3.0/gems/activesupport-4.2.9/lib/active_support/dependencies.rb:268:in `block in load'
	from /Users/Henrik/.rbenv/versions/2.3.4/lib/ruby/gems/2.3.0/gems/activesupport-4.2.9/lib/active_support/dependencies.rb:240:in `load_dependency'
	from /Users/Henrik/.rbenv/versions/2.3.4/lib/ruby/gems/2.3.0/gems/activesupport-4.2.9/lib/active_support/dependencies.rb:268:in `load'
	from /Users/Henrik/.rbenv/versions/2.3.4/lib/ruby/gems/2.3.0/gems/railties-4.2.9/lib/rails/engine.rb:652:in `block in load_config_initializer'
	from /Users/Henrik/.rbenv/versions/2.3.4/lib/ruby/gems/2.3.0/gems/activesupport-4.2.9/lib/active_support/notifications.rb:166:in `instrument'
	from /Users/Henrik/.rbenv/versions/2.3.4/lib/ruby/gems/2.3.0/gems/railties-4.2.9/lib/rails/engine.rb:651:in `load_config_initializer'
	from /Users/Henrik/.rbenv/versions/2.3.4/lib/ruby/gems/2.3.0/gems/railties-4.2.9/lib/rails/engine.rb:616:in `block (2 levels) in <class:Engine>'
	from /Users/Henrik/.rbenv/versions/2.3.4/lib/ruby/gems/2.3.0/gems/railties-4.2.9/lib/rails/engine.rb:615:in `each'
	from /Users/Henrik/.rbenv/versions/2.3.4/lib/ruby/gems/2.3.0/gems/railties-4.2.9/lib/rails/engine.rb:615:in `block in <class:Engine>'
	from /Users/Henrik/.rbenv/versions/2.3.4/lib/ruby/gems/2.3.0/gems/railties-4.2.9/lib/rails/initializable.rb:30:in `instance_exec'
	from /Users/Henrik/.rbenv/versions/2.3.4/lib/ruby/gems/2.3.0/gems/railties-4.2.9/lib/rails/initializable.rb:30:in `run'
	from /Users/Henrik/.rbenv/versions/2.3.4/lib/ruby/gems/2.3.0/gems/railties-4.2.9/lib/rails/initializable.rb:55:in `block in run_initializers'
	from /Users/Henrik/.rbenv/versions/2.3.4/lib/ruby/2.3.0/tsort.rb:228:in `block in tsort_each'
	from /Users/Henrik/.rbenv/versions/2.3.4/lib/ruby/2.3.0/tsort.rb:350:in `block (2 levels) in each_strongly_connected_component'
	from /Users/Henrik/.rbenv/versions/2.3.4/lib/ruby/2.3.0/tsort.rb:422:in `block (2 levels) in each_strongly_connected_component_from'
	from /Users/Henrik/.rbenv/versions/2.3.4/lib/ruby/2.3.0/tsort.rb:431:in `each_strongly_connected_component_from'
	from /Users/Henrik/.rbenv/versions/2.3.4/lib/ruby/2.3.0/tsort.rb:421:in `block in each_strongly_connected_component_from'
	from /Users/Henrik/.rbenv/versions/2.3.4/lib/ruby/gems/2.3.0/gems/railties-4.2.9/lib/rails/initializable.rb:44:in `each'
	from /Users/Henrik/.rbenv/versions/2.3.4/lib/ruby/gems/2.3.0/gems/railties-4.2.9/lib/rails/initializable.rb:44:in `tsort_each_child'
	from /Users/Henrik/.rbenv/versions/2.3.4/lib/ruby/2.3.0/tsort.rb:415:in `call'
	from /Users/Henrik/.rbenv/versions/2.3.4/lib/ruby/2.3.0/tsort.rb:415:in `each_strongly_connected_component_from'
	from /Users/Henrik/.rbenv/versions/2.3.4/lib/ruby/2.3.0/tsort.rb:349:in `block in each_strongly_connected_component'
	from /Users/Henrik/.rbenv/versions/2.3.4/lib/ruby/2.3.0/tsort.rb:347:in `each'
	from /Users/Henrik/.rbenv/versions/2.3.4/lib/ruby/2.3.0/tsort.rb:347:in `call'
	from /Users/Henrik/.rbenv/versions/2.3.4/lib/ruby/2.3.0/tsort.rb:347:in `each_strongly_connected_component'
	from /Users/Henrik/.rbenv/versions/2.3.4/lib/ruby/2.3.0/tsort.rb:226:in `tsort_each'
	from /Users/Henrik/.rbenv/versions/2.3.4/lib/ruby/2.3.0/tsort.rb:205:in `tsort_each'
	from /Users/Henrik/.rbenv/versions/2.3.4/lib/ruby/gems/2.3.0/gems/railties-4.2.9/lib/rails/initializable.rb:54:in `run_initializers'
	from /Users/Henrik/.rbenv/versions/2.3.4/lib/ruby/gems/2.3.0/gems/railties-4.2.9/lib/rails/application.rb:352:in `initialize!'
	from /Users/Henrik/.rbenv/versions/2.3.4/lib/ruby/gems/2.3.0/gems/railties-4.2.9/lib/rails/railtie.rb:194:in `public_send'
	from /Users/Henrik/.rbenv/versions/2.3.4/lib/ruby/gems/2.3.0/gems/railties-4.2.9/lib/rails/railtie.rb:194:in `method_missing'
	from /Users/Henrik/Documents/Discourse/config/environment.rb:5:in `<main>'
	from /Users/Henrik/.rbenv/versions/2.3.4/lib/ruby/gems/2.3.0/gems/bootsnap-1.0.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:17:in `require'
	from /Users/Henrik/.rbenv/versions/2.3.4/lib/ruby/gems/2.3.0/gems/bootsnap-1.0.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:17:in `require'
	from /Users/Henrik/.rbenv/versions/2.3.4/lib/ruby/gems/2.3.0/gems/activesupport-4.2.9/lib/active_support/dependencies.rb:274:in `block in require'
	from /Users/Henrik/.rbenv/versions/2.3.4/lib/ruby/gems/2.3.0/gems/activesupport-4.2.9/lib/active_support/dependencies.rb:240:in `load_dependency'
	from /Users/Henrik/.rbenv/versions/2.3.4/lib/ruby/gems/2.3.0/gems/activesupport-4.2.9/lib/active_support/dependencies.rb:274:in `require'
	from /Users/Henrik/Documents/Discourse/config.ru:2:in `block in <main>'
	from /Users/Henrik/.rbenv/versions/2.3.4/lib/ruby/gems/2.3.0/gems/rack-1.6.8/lib/rack/builder.rb:55:in `instance_eval'
	from /Users/Henrik/.rbenv/versions/2.3.4/lib/ruby/gems/2.3.0/gems/rack-1.6.8/lib/rack/builder.rb:55:in `initialize'
	from /Users/Henrik/Documents/Discourse/config.ru:in `new'
	from /Users/Henrik/Documents/Discourse/config.ru:in `<main>'
	from /Users/Henrik/.rbenv/versions/2.3.4/lib/ruby/gems/2.3.0/gems/rack-1.6.8/lib/rack/builder.rb:49:in `eval'
	from /Users/Henrik/.rbenv/versions/2.3.4/lib/ruby/gems/2.3.0/gems/rack-1.6.8/lib/rack/builder.rb:49:in `new_from_string'
	from /Users/Henrik/.rbenv/versions/2.3.4/lib/ruby/gems/2.3.0/gems/rack-1.6.8/lib/rack/builder.rb:40:in `parse_file'
	from /Users/Henrik/.rbenv/versions/2.3.4/lib/ruby/gems/2.3.0/gems/rack-1.6.8/lib/rack/server.rb:300:in `build_app_and_options_from_config'
	from /Users/Henrik/.rbenv/versions/2.3.4/lib/ruby/gems/2.3.0/gems/rack-1.6.8/lib/rack/server.rb:209:in `app'
	from /Users/Henrik/.rbenv/versions/2.3.4/lib/ruby/gems/2.3.0/gems/railties-4.2.9/lib/rails/commands/server.rb:61:in `app'
	from /Users/Henrik/.rbenv/versions/2.3.4/lib/ruby/gems/2.3.0/gems/rack-1.6.8/lib/rack/server.rb:337:in `wrapped_app'
	from /Users/Henrik/.rbenv/versions/2.3.4/lib/ruby/gems/2.3.0/gems/railties-4.2.9/lib/rails/commands/server.rb:139:in `log_to_stdout'
	from /Users/Henrik/.rbenv/versions/2.3.4/lib/ruby/gems/2.3.0/gems/railties-4.2.9/lib/rails/commands/server.rb:78:in `start'
	from /Users/Henrik/.rbenv/versions/2.3.4/lib/ruby/gems/2.3.0/gems/railties-4.2.9/lib/rails/commands/commands_tasks.rb:80:in `block in server'
	from /Users/Henrik/.rbenv/versions/2.3.4/lib/ruby/gems/2.3.0/gems/railties-4.2.9/lib/rails/commands/commands_tasks.rb:75:in `tap'
	from /Users/Henrik/.rbenv/versions/2.3.4/lib/ruby/gems/2.3.0/gems/railties-4.2.9/lib/rails/commands/commands_tasks.rb:75:in `server'
	from /Users/Henrik/.rbenv/versions/2.3.4/lib/ruby/gems/2.3.0/gems/railties-4.2.9/lib/rails/commands/commands_tasks.rb:39:in `run_command!'
	from /Users/Henrik/.rbenv/versions/2.3.4/lib/ruby/gems/2.3.0/gems/railties-4.2.9/lib/rails/commands.rb:17:in `<main>'
	from /Users/Henrik/.rbenv/versions/2.3.4/lib/ruby/gems/2.3.0/gems/bootsnap-1.0.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:17:in `require'
	from /Users/Henrik/.rbenv/versions/2.3.4/lib/ruby/gems/2.3.0/gems/bootsnap-1.0.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:17:in `require'
	from /Users/Henrik/.rbenv/versions/2.3.4/lib/ruby/gems/2.3.0/gems/activesupport-4.2.9/lib/active_support/dependencies.rb:274:in `block in require'
	from /Users/Henrik/.rbenv/versions/2.3.4/lib/ruby/gems/2.3.0/gems/activesupport-4.2.9/lib/active_support/dependencies.rb:240:in `load_dependency'
	from /Users/Henrik/.rbenv/versions/2.3.4/lib/ruby/gems/2.3.0/gems/activesupport-4.2.9/lib/active_support/dependencies.rb:274:in `require'
	from bin/rails:4:in `<main>'

(Sam Saffron) #138

Looks to me like postgres is not running on your dev box, or you have no access to it.


(Henrik Berg) #139

I’ve accessed postgres on that account before - unsure why it’s acting up.


(Michael Friedrich) #140

How did you connect to PostgreSQL? I’d assume this one is installed by Homebrew. These hints here might still exist/help:

My PostgreSQL looks like this for example:

michi@mbmif ~/coding/icinga/icinga2 (feature/api-pretty=) $ ps aux | grep postgres
michi             1143   0.0  0.0  4449164    836   ??  Ss   Thu11AM   0:00.11 postgres: bgworker: logical replication launcher
michi             1142   0.0  0.0  4304096    544   ??  Ss   Thu11AM   0:02.25 postgres: stats collector process
michi             1141   0.0  0.0  4449164   1128   ??  Ss   Thu11AM   0:01.33 postgres: autovacuum launcher process
michi             1140   0.0  0.0  4449164    440   ??  Ss   Thu11AM   0:01.54 postgres: wal writer process
michi             1139   0.0  0.0  4449164    500   ??  Ss   Thu11AM   0:01.65 postgres: writer process
michi             1138   0.0  0.0  4449164    516   ??  Ss   Thu11AM   0:00.07 postgres: checkpointer process
michi             1025   0.0  0.0  4449420   3308   ??  S    Thu11AM   0:00.54 /usr/local/opt/postgresql/bin/postgres -D /usr/local/var/postgres
michi            86512   0.0  0.0  4267752    876 s006  S+    4:12PM   0:00.00 grep postgres

(Henrik Berg) #141

Thanks for the help!

I’m also trying to run another Discourse instance on another Mac. I followed all the steps exactly as they were shown and when running bundle exec rake autospec I receive a lot of failures. Is there a way to check why they are failing and how to resolve them?

Henriks-MacBook-Pro:Discourse henrik$ bundle exec rake autospec
/Users/henrik/.rbenv/versions/2.3.4/lib/ruby/gems/2.3.0/gems/i18n-0.8.6/lib/i18n.rb:12: warning: already initialized constant I18n::RESERVED_KEYS
/Users/henrik/.rbenv/versions/2.3.4/lib/ruby/gems/2.3.0/gems/i18n-0.8.6/lib/i18n.rb:12: warning: previous definition of RESERVED_KEYS was here
/Users/henrik/.rbenv/versions/2.3.4/lib/ruby/gems/2.3.0/gems/i18n-0.8.6/lib/i18n.rb:13: warning: already initialized constant I18n::RESERVED_KEYS_PATTERN
/Users/henrik/.rbenv/versions/2.3.4/lib/ruby/gems/2.3.0/gems/i18n-0.8.6/lib/i18n.rb:13: warning: previous definition of RESERVED_KEYS_PATTERN was here
If file watching is not working, you can force polling with: bundle exec rake autospec p l=3
Skipping JS tests, run them in the browser at /qunit or add QUNIT=1 to env
Running Rspec: spec
Press [ENTER] to stop the current run
DEPRECATION WARNING: Using a dynamic :action segment in a route is deprecated and will be removed in Rails 5.2. (called from <top (required)> at /Users/henrik/Documents/Discourse/config/environment.rb:5)

Randomized with seed 9240
................................................................................................................................................................................................................................................................................................................................................................................................F........................FFFF............FF...........................................................................................F...................................................................................................................FFF.........................................................................................................................................................F........................................................................................................................................F............*..*..................F....FF.F..........................................................................................................................................................................................................................F................................................................................................FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF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FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF

Pending: (Failures listed here are expected and do not affect your suite's status)

  1) Search Chinese search finds chinese topic based on title if tokenization is forced
     # skipped until pg app installs the db correctly
     # ./spec/components/search_spec.rb:538

  2) Search Chinese search finds chinese topic based on title
     # skipped until pg app installs the db correctly
     # ./spec/components/search_spec.rb:526


/Users/henrik/.rbenv/versions/2.3.4/lib/ruby/gems/2.3.0/gems/rspec-core-3.6.0/lib/rspec/core/configuration.rb:1460:in `expand_path': Too many open files - getcwd (Errno::EMFILE)
	from /Users/henrik/.rbenv/versions/2.3.4/lib/ruby/gems/2.3.0/gems/rspec-core-3.6.0/lib/rspec/core/configuration.rb:1460:in `block in in_project_source_dir_regex'
	from /Users/henrik/.rbenv/versions/2.3.4/lib/ruby/gems/2.3.0/gems/rspec-core-3.6.0/lib/rspec/core/configuration.rb:1459:in `map'
	from /Users/henrik/.rbenv/versions/2.3.4/lib/ruby/gems/2.3.0/gems/rspec-core-3.6.0/lib/rspec/core/configuration.rb:1459:in `in_project_source_dir_regex'
	from /Users/henrik/.rbenv/versions/2.3.4/lib/ruby/gems/2.3.0/gems/rspec-core-3.6.0/lib/rspec/core/formatters/exception_presenter.rb:229:in `find_failed_line'
	from /Users/henrik/.rbenv/versions/2.3.4/lib/ruby/gems/2.3.0/gems/rspec-core-3.6.0/lib/rspec/core/formatters/exception_presenter.rb:205:in `read_failed_lines'
	from /Users/henrik/.rbenv/versions/2.3.4/lib/ruby/gems/2.3.0/gems/rspec-core-3.6.0/lib/rspec/core/formatters/exception_presenter.rb:163:in `failure_slash_error_lines'
	from /Users/henrik/.rbenv/versions/2.3.4/lib/ruby/gems/2.3.0/gems/rspec-core-3.6.0/lib/rspec/core/formatters/exception_presenter.rb:150:in `block in failure_lines'
	from /Users/henrik/.rbenv/versions/2.3.4/lib/ruby/gems/2.3.0/gems/rspec-core-3.6.0/lib/rspec/core/formatters/exception_presenter.rb:149:in `tap'
	from /Users/henrik/.rbenv/versions/2.3.4/lib/ruby/gems/2.3.0/gems/rspec-core-3.6.0/lib/rspec/core/formatters/exception_presenter.rb:149:in `failure_lines'
	from /Users/henrik/.rbenv/versions/2.3.4/lib/ruby/gems/2.3.0/gems/rspec-core-3.6.0/lib/rspec/core/formatters/exception_presenter.rb:34:in `colorized_message_lines'
	from /Users/henrik/.rbenv/versions/2.3.4/lib/ruby/gems/2.3.0/gems/rspec-core-3.6.0/lib/rspec/core/formatters/exception_presenter.rb:240:in `formatted_message_and_backtrace'
	from /Users/henrik/.rbenv/versions/2.3.4/lib/ruby/gems/2.3.0/gems/rspec-core-3.6.0/lib/rspec/core/formatters/exception_presenter.rb:86:in `fully_formatted_lines'
	from /Users/henrik/.rbenv/versions/2.3.4/lib/ruby/gems/2.3.0/gems/rspec-core-3.6.0/lib/rspec/core/formatters/exception_presenter.rb:78:in `fully_formatted'
	from /Users/henrik/.rbenv/versions/2.3.4/lib/ruby/gems/2.3.0/gems/rspec-core-3.6.0/lib/rspec/core/notifications.rb:200:in `fully_formatted'
	from /Users/henrik/.rbenv/versions/2.3.4/lib/ruby/gems/2.3.0/gems/rspec-core-3.6.0/lib/rspec/core/notifications.rb:114:in `block in fully_formatted_failed_examples'
	from /Users/henrik/.rbenv/versions/2.3.4/lib/ruby/gems/2.3.0/gems/rspec-core-3.6.0/lib/rspec/core/notifications.rb:113:in `each'
	from /Users/henrik/.rbenv/versions/2.3.4/lib/ruby/gems/2.3.0/gems/rspec-core-3.6.0/lib/rspec/core/notifications.rb:113:in `each_with_index'
	from /Users/henrik/.rbenv/versions/2.3.4/lib/ruby/gems/2.3.0/gems/rspec-core-3.6.0/lib/rspec/core/notifications.rb:113:in `fully_formatted_failed_examples'
	from /Users/henrik/.rbenv/versions/2.3.4/lib/ruby/gems/2.3.0/gems/rspec-core-3.6.0/lib/rspec/core/formatters/base_text_formatter.rb:32:in `dump_failures'
	from /Users/henrik/.rbenv/versions/2.3.4/lib/ruby/gems/2.3.0/gems/rspec-core-3.6.0/lib/rspec/core/reporter.rb:206:in `block in notify'
	from /Users/henrik/.rbenv/versions/2.3.4/lib/ruby/gems/2.3.0/gems/rspec-core-3.6.0/lib/rspec/core/reporter.rb:205:in `each'
	from /Users/henrik/.rbenv/versions/2.3.4/lib/ruby/gems/2.3.0/gems/rspec-core-3.6.0/lib/rspec/core/reporter.rb:205:in `notify'
	from /Users/henrik/.rbenv/versions/2.3.4/lib/ruby/gems/2.3.0/gems/rspec-core-3.6.0/lib/rspec/core/reporter.rb:175:in `block in finish'
	from /Users/henrik/.rbenv/versions/2.3.4/lib/ruby/gems/2.3.0/gems/rspec-core-3.6.0/lib/rspec/core/reporter.rb:191:in `close_after'
	from /Users/henrik/.rbenv/versions/2.3.4/lib/ruby/gems/2.3.0/gems/rspec-core-3.6.0/lib/rspec/core/reporter.rb:171:in `finish'
	from /Users/henrik/.rbenv/versions/2.3.4/lib/ruby/gems/2.3.0/gems/rspec-core-3.6.0/lib/rspec/core/reporter.rb:81:in `ensure in report'
	from /Users/henrik/.rbenv/versions/2.3.4/lib/ruby/gems/2.3.0/gems/rspec-core-3.6.0/lib/rspec/core/reporter.rb:81:in `report'
	from /Users/henrik/.rbenv/versions/2.3.4/lib/ruby/gems/2.3.0/gems/rspec-core-3.6.0/lib/rspec/core/runner.rb:112:in `run_specs'
	from /Users/henrik/.rbenv/versions/2.3.4/lib/ruby/gems/2.3.0/gems/rspec-core-3.6.0/lib/rspec/core/runner.rb:87:in `run'
	from /Users/henrik/.rbenv/versions/2.3.4/lib/ruby/gems/2.3.0/gems/rspec-core-3.6.0/lib/rspec/core/runner.rb:71:in `run'
	from /Users/henrik/.rbenv/versions/2.3.4/lib/ruby/gems/2.3.0/gems/rspec-core-3.6.0/lib/rspec/core/runner.rb:45:in `invoke'
	from /Users/henrik/.rbenv/versions/2.3.4/lib/ruby/gems/2.3.0/gems/rspec-core-3.6.0/exe/rspec:4:in `<top (required)>'
	from bin/rspec:16:in `load'
	from bin/rspec:16:in `<main>'

(I’ve attempted to run this command multiple times and in some cases I do not receive as many errors. Not sure why this occurs.)

Edit: I can still run the Discourse instance (without issues it seems), is this normal?


(Florian) #142

I’ve used this guide to install Discourse on macOS and noticed that it doesn’t mention that a specific version of PostgreSQL, namely PostgreSQL 9.5, needs to be installed.

I’ve noticed that right at the point where I wanted to import a backup to my production cloud-based install of Discourse. It failed due to a different format produced by pg_dump for PostgreSQL 10.1

I’ve uninstalled 10.1 and installed 9.5 via

brew services stop postgresql
brew uninstall postgresql
brew install postgresql@9.5
brew services start postgresql@9.5
gem uninstall pg
gem install pg

(Raha Soleymanzadeh) #143

I am following all the steps and after this command, bundle exec rake autospec
I got this error:

DEPRECATION WARNING: Using a dynamic :action segment in a route is deprecated and will be removed in Rails 5.2. (called from <top (required)> at /Users/home/discours/config/environment.rb:5)

Randomized with seed 6774

How can I solve this?


(Brenner) #144

I’m trying to figure out if I should be running this script, or the instructions here: discourse/DEVELOPMENT-OSX-NATIVE.md at master · discourse/discourse · GitHub

Which should I be following? (osx 10.12.6)


(Andrew Schleifer) #145

You can ignore that. It’s a warning from the framework that a method being used will go away in a future version.


(Andrew Schleifer) #146

Use whichever one you find easier to understand, the end result is practically the same.


(Raha Soleymanzadeh) #147

After Creating new Admin when I click on login button I got this message

You can’t log in yet. We previously sent an activation email to you at Email address. Please follow the instructions in that email to activate your account.

But I don’t know How can I active an email?


(Arpit Jalan) #148

There was a bug in rake task which was fixed 2 days ago. Can you update to latest Discourse version and run bundle exec rake admin:create again? Reset the password and your admin account will be activated.


(Raha Soleymanzadeh) #149

Thanks a lot. Actually, I am really new how can I update Discourse on my mac?


(Arpit Jalan) #150
cd ~/discourse
git pull origin master

(Raha Soleymanzadeh) #151

I really appreciate, it’s work.