Запуск Sharetribe с открытым исходным кодом в Ubuntu 18.04 - PullRequest
0 голосов
/ 30 сентября 2018

Недавно я пытался настроить openShare Sharetribe в Ubuntu. 18.04 https://github.com/sharetribe/sharetribe

Я дошел до всего, что было до

bundle exec rake db:create db:structure:load

, но каждый раз, когда я пытаюсь запустить егоЯ получаю сообщение об ошибке:

$ bundle exec rake db:create db:structure:load

rake aborted!
LoadError: cannot load such file -- arel/visitors/mysql
/home/luis/.rvm/gems/ruby-2.3.4@sharetribe/gems/arel-8.0.0/lib/arel/visitors.rb:7:in `require'
/home/luis/.rvm/gems/ruby-2.3.4@sharetribe/gems/arel-8.0.0/lib/arel/visitors.rb:7:in `<top (required)>'
/home/luis/.rvm/gems/ruby-2.3.4@sharetribe/gems/arel-8.0.0/lib/arel.rb:17:in `require'
/home/luis/.rvm/gems/ruby-2.3.4@sharetribe/gems/arel-8.0.0/lib/arel.rb:17:in `<top (required)>'
/home/luis/.rvm/gems/ruby-2.3.4@sharetribe/gems/activerecord-5.1.1/lib/active_record.rb:27:in `require'
/home/luis/.rvm/gems/ruby-2.3.4@sharetribe/gems/activerecord-5.1.1/lib/active_record.rb:27:in `<top (required)>'
/home/luis/.rvm/gems/ruby-2.3.4@sharetribe/gems/thinking-sphinx-3.3.0/lib/thinking_sphinx.rb:12:in `require'
/home/luis/.rvm/gems/ruby-2.3.4@sharetribe/gems/thinking-sphinx-3.3.0/lib/thinking_sphinx.rb:12:in `<top (required)>'
/home/luis/.rvm/gems/ruby-2.3.4@sharetribe/gems/thinking-sphinx-3.3.0/lib/thinking-sphinx.rb:1:in `require'
/home/luis/.rvm/gems/ruby-2.3.4@sharetribe/gems/thinking-sphinx-3.3.0/lib/thinking-sphinx.rb:1:in `<top (required)>'
/home/luis/.rvm/gems/ruby-2.3.4@sharetribe/gems/bundler-1.16.5/lib/bundler/runtime.rb:81:in `require'
/home/luis/.rvm/gems/ruby-2.3.4@sharetribe/gems/bundler-1.16.5/lib/bundler/runtime.rb:81:in `block (2 levels) in require'
/home/luis/.rvm/gems/ruby-2.3.4@sharetribe/gems/bundler-1.16.5/lib/bundler/runtime.rb:76:in `each'
/home/luis/.rvm/gems/ruby-2.3.4@sharetribe/gems/bundler-1.16.5/lib/bundler/runtime.rb:76:in `block in require'
/home/luis/.rvm/gems/ruby-2.3.4@sharetribe/gems/bundler-1.16.5/lib/bundler/runtime.rb:65:in `each'
/home/luis/.rvm/gems/ruby-2.3.4@sharetribe/gems/bundler-1.16.5/lib/bundler/runtime.rb:65:in `require'
/home/luis/.rvm/gems/ruby-2.3.4@sharetribe/gems/bundler-1.16.5/lib/bundler.rb:114:in `require'
/home/luis/Documents/upwork_projects/sharetribe/config/application.rb:22:in `<top (required)>'
/home/luis/Documents/upwork_projects/sharetribe/Rakefile:4:in `require'
/home/luis/Documents/upwork_projects/sharetribe/Rakefile:4:in `<top (required)>'
/home/luis/.rvm/gems/ruby-2.3.4@sharetribe/gems/rake-11.3.0/exe/rake:27:in `<top (required)>'
/home/luis/.rvm/gems/ruby-2.3.4@sharetribe/bin/ruby_executable_hooks:24:in `eval'
/home/luis/.rvm/gems/ruby-2.3.4@sharetribe/bin/ruby_executable_hooks:24:in `<main>'
(See full trace by running task with --trace)

Я сделал:

gem install bundler

git clone git://github.com/sharetribe/sharetribe.git
cd sharetribe
git checkout latest

bundle install

brew tap homebrew/versions
brew install v8-315

gem install libv8 -v '3.16.14.13' -- --with-system-v8
gem install therubyracer -- --with-v8-dir=/usr/local/opt/v8-315

bundle install

npm install

Я скопировал и настроил config.yml и database.yml

Я попыталсяпереустановка mysql с помощью

https://websiteforstudents.com/install-mysql-8-0-on-ubuntu-16-04-17-10-18-04/

и

brew install mysql

и

https://gorails.com/setup/ubuntu/18.04#mysql

все та же ошибка

Я также пытаюсь использовать Docker

https://docs.docker.com/

с

docker build -t sharetribe .
docker run -it --rm sharetribe bundle exec rake test
docker run -itP sharetribe

, но я получаю этот вывод

$ docker run -itP sharetribe
 --> Downloading a Phusion Passenger agent binary for your platform

 --> Installing Nginx 1.10.3 engine

--------------------------

 [passenger_native_support.so] trying to compile for the current user (app) and Ruby interpreter...
     (set PASSENGER_COMPILE_NATIVE_SUPPORT_BINARY=0 to disable)
     Compilation successful. The logs are here:
     /tmp/passenger_native_support-r49ony.log
 [passenger_native_support.so] successfully loaded.
[ 2018-09-30 01:34:22.5118 67/7f4f27bad740 age/Wat/WatchdogMain.cpp:1281 ]: Starting Passenger watchdog...
[ 2018-09-30 01:34:22.5195 70/7fa9a3141740 age/Cor/CoreMain.cpp:1070 ]: Starting Passenger core...
[ 2018-09-30 01:34:22.5198 70/7fa9a3141740 age/Cor/CoreMain.cpp:245 ]: Passenger core running in multi-application mode.
[ 2018-09-30 01:34:22.5271 70/7fa9a3141740 age/Cor/CoreMain.cpp:820 ]: Passenger core online, PID 70
[ 2018-09-30 01:34:22.5351 76/7f738855e740 age/Ust/UstRouterMain.cpp:529 ]: Starting Passenger UstRouter...
[ 2018-09-30 01:34:22.5361 76/7f738855e740 age/Ust/UstRouterMain.cpp:342 ]: Passenger UstRouter online, PID 76
=============== Phusion Passenger Standalone web server started ===============
PID file: /opt/app/passenger.3000.pid
Log file: /dev/stdout
Environment: production
Accessible via: http://0.0.0.0:3000/

You can stop Phusion Passenger Standalone by pressing Ctrl-C.
Problems? Check https://www.phusionpassenger.com/library/admin/standalone/troubleshooting/
===============================================================================
App 111 stdout: 
[ 2018-09-30 01:34:27.2563 70/7fa9a1e2c700 age/Cor/SecurityUpdateChecker.h:358 ]: A security update is available for your version (5.1.4) of Passenger, we strongly recommend upgrading to version 5.3.5.
[ 2018-09-30 01:34:27.2564 70/7fa9a1e2c700 age/Cor/SecurityUpdateChecker.h:363 ]:  Additional information: 
Several critical security issues have been fixed since v5.1.4, due to an issue in Passenger < 5.1.6 we can not display more info.
App 111 stdout: 
[ 2018-09-30 01:34:55.7016 70/7fa9a2f96700 age/Cor/App/Implementation.cpp:304 ]: Could not spawn process for application /opt/app: An error occurred while starting up the preloader.
  Error ID: 0f6a38c4
  Error details saved to: /tmp/passenger-error.1T5tMO
  Message from application: Cannot load `Rails.application.database_configuration`:
Could not load database configuration. No such file - ["config/database.yml"] (RuntimeError)
  /opt/app/vendor/bundle/ruby/2.3.0/gems/railties-5.1.1/lib/rails/application/configuration.rb:139:in `database_configuration'
  /opt/app/vendor/bundle/ruby/2.3.0/gems/activerecord-5.1.1/lib/active_record/railtie.rb:121:in `block (2 levels) in <class:Railtie>'
  /opt/app/vendor/bundle/ruby/2.3.0/gems/activesupport-5.1.1/lib/active_support/lazy_load_hooks.rb:45:in `instance_eval'
  /opt/app/vendor/bundle/ruby/2.3.0/gems/activesupport-5.1.1/lib/active_support/lazy_load_hooks.rb:45:in `execute_hook'
  /opt/app/vendor/bundle/ruby/2.3.0/gems/activesupport-5.1.1/lib/active_support/lazy_load_hooks.rb:35:in `block in on_load'
  /opt/app/vendor/bundle/ruby/2.3.0/gems/activesupport-5.1.1/lib/active_support/lazy_load_hooks.rb:34:in `each'
  /opt/app/vendor/bundle/ruby/2.3.0/gems/activesupport-5.1.1/lib/active_support/lazy_load_hooks.rb:34:in `on_load'
  /opt/app/vendor/bundle/ruby/2.3.0/gems/activerecord-5.1.1/lib/active_record/railtie.rb:120:in `block in <class:Railtie>'
  /opt/app/vendor/bundle/ruby/2.3.0/gems/railties-5.1.1/lib/rails/initializable.rb:30:in `instance_exec'
  /opt/app/vendor/bundle/ruby/2.3.0/gems/railties-5.1.1/lib/rails/initializable.rb:30:in `run'
  /opt/app/vendor/bundle/ruby/2.3.0/gems/railties-5.1.1/lib/rails/initializable.rb:59:in `block in run_initializers'
  /usr/local/lib/ruby/2.3.0/tsort.rb:228:in `block in tsort_each'
  /usr/local/lib/ruby/2.3.0/tsort.rb:350:in `block (2 levels) in each_strongly_connected_component'
  /usr/local/lib/ruby/2.3.0/tsort.rb:431:in `each_strongly_connected_component_from'
  /usr/local/lib/ruby/2.3.0/tsort.rb:349:in `block in each_strongly_connected_component'
  /usr/local/lib/ruby/2.3.0/tsort.rb:347:in `each'
  /usr/local/lib/ruby/2.3.0/tsort.rb:347:in `call'
  /usr/local/lib/ruby/2.3.0/tsort.rb:347:in `each_strongly_connected_component'
  /usr/local/lib/ruby/2.3.0/tsort.rb:226:in `tsort_each'
  /usr/local/lib/ruby/2.3.0/tsort.rb:205:in `tsort_each'
  /opt/app/vendor/bundle/ruby/2.3.0/gems/railties-5.1.1/lib/rails/initializable.rb:58:in `run_initializers'
  /opt/app/vendor/bundle/ruby/2.3.0/gems/railties-5.1.1/lib/rails/application.rb:353:in `initialize!'
  /opt/app/config/environment.rb:19:in `<top (required)>'
  config.ru:3:in `require'
  config.ru:3:in `block in <main>'
  /opt/app/vendor/bundle/ruby/2.3.0/gems/rack-2.0.5/lib/rack/builder.rb:55:in `instance_eval'
  /opt/app/vendor/bundle/ruby/2.3.0/gems/rack-2.0.5/lib/rack/builder.rb:55:in `initialize'
  config.ru:1:in `new'
  config.ru:1:in `<main>'
  /opt/app/vendor/bundle/ruby/2.3.0/gems/passenger-5.1.4/src/helper-scripts/rack-preloader.rb:110:in `eval'
  /opt/app/vendor/bundle/ruby/2.3.0/gems/passenger-5.1.4/src/helper-scripts/rack-preloader.rb:110:in `preload_app'
  /opt/app/vendor/bundle/ruby/2.3.0/gems/passenger-5.1.4/src/helper-scripts/rack-preloader.rb:156:in `<module:App>'
  /opt/app/vendor/bundle/ruby/2.3.0/gems/passenger-5.1.4/src/helper-scripts/rack-preloader.rb:30:in `<module:PhusionPassenger>'
  /opt/app/vendor/bundle/ruby/2.3.0/gems/passenger-5.1.4/src/helper-scripts/rack-preloader.rb:29:in `<main>'


[ 2018-09-30 01:34:55.7990 70/7fa9a15aa700 age/Cor/Con/CheckoutSession.cpp:285 ]: [Client 1-1] Cannot checkout session because a spawning error occurred. The identifier of the error is 0f6a38c4. Please see earlier logs for details about the error.

Мои настройки:

Ubuntu 18.04 ruby ​​2.3.4

GemFile:

source 'http://rubygems.org'

ruby '2.3.4'

gem 'rails', '5.1.1'

gem 'coffee-rails', '~> 4.2.2'
gem 'uglifier', '~> 3.2.0'

gem 'sass-rails', '~> 5.0.6'
gem 'compass-rails', '~> 3.0.2'

gem 'jquery-rails', '~> 4.3.1'

# Bundle the extra gems:

# gem 'heroku' install the Heroku toolbelt (https://toolbelt.heroku.com/) instead (as gem had some problems)
gem "passenger", '~> 5.1.4'

gem "mysql2", '~> 0.4.6'
gem 'haml', '~> 5.0.1'
gem 'sass', '~> 3.4.24'
gem 'rack-attack', '~> 5.0.1'
gem 'rest-client', '~> 2.0.2'

gem 'paperclip', '~> 5.2.1'
gem 'delayed_paperclip', '~> 3.0.1'

gem 'aws-sdk', '~> 2.9.25'
gem "will_paginate", '~> 3.1.5'
gem 'dalli', '~> 2.7.6'
gem "memcachier", '~> 0.0.2'
gem 'readthis', '~> 2.0.2'
gem 'hiredis', '~> 0.6.1'
gem 'thinking-sphinx', '~> 3.3.0'
gem 'flying-sphinx', '~> 1.2.0'
# Use patched v2.0.2
# Fixes issues: Create a new delayed delta job if there is an existing delta job which has failed
gem 'ts-delayed-delta',
  :git    => 'https://github.com/pat/ts-delayed-delta.git',
  :branch => 'master',
  :ref    => '0aef2195f3acc1da048f18bc0191c90538565705'
gem 'possibly', '~> 1.0.1'

gem 'delayed_job', '~> 4.1.3'
gem 'delayed_job_active_record', '~> 4.1.2'

gem 'web_translate_it', '~> 2.4.1'
gem 'rails-i18n', '~> 5.0.4'
gem 'devise', '~> 4.3.0'
gem 'devise-encryptable', '~> 0.2.0'
gem "omniauth-facebook", '~> 4.0.0'

# Dynamic form adds helpers that are needed, e.g. error_messages
gem 'dynamic_form', '~> 1.1.4'
gem "truncate_html", '~> 0.9.3'
gem 'money-rails', '~> 1.8.0'

# Modified version with Rails 5 fixes
gem 'mercury-rails',
  git: 'https://github.com/ithouse/mercury.git',
  branch: 'master',
  ref: '1a9d4ac5a0a5fd0d459ff1986f9f05e617415b16'

gem 'countries', '~> 2.0.8'
gem "mail_view", '~> 2.0.4'
gem 'statesman', '~> 2.0.1'
gem "premailer", '~> 1.10.4'
gem 'stringex', '~> 2.7.1'
gem 'paypal-sdk-permissions', '~> 1.96.4'
gem 'paypal-sdk-merchant', '~> 1.116.0'
gem 'airbrake', '~> 6.1.2'
gem 'stripe', '~> 3.0.0'

gem 'jwt', '~> 1.5.6'

gem 'oauth2', '~> 1.3.1'

gem 'lograge', '~> 0.5.1'
gem 'public_suffix', '~> 2.0.5' # Needed currently to set GA hostname right, probably not
# needed anymore when GA script updated.

# Session store was removed from Rails 4
gem 'activerecord-session_store', '~> 1.1.0'

gem 'faraday', '~> 0.11.0'
gem 'faraday_middleware', '~> 0.11.0'
gem 'faraday-encoding', '~> 0.0.4'

gem "react_on_rails", "~>6.9.0"

gem "css_parser", '~> 1.5.0'
gem 'sitemap_generator', '~> 5.3.1'

gem "i18n-js", '~> 3.0.0'

# A store scoped to the request object for caching
gem "request_store", '~> 1.3.2'

# ActionMailer dependency that needs forced update for security patch
gem 'mail', '~> 2.6.6.rc1'

group :staging, :production do
  gem 'newrelic_rpm', '~> 4.2.0.334'
  gem 'rails_12factor', '~> 0.0.3'
end

group :development, :test do
  gem 'rubocop', '~> 0.49.1', require: false
  gem 'factory_girl_rails', '~> 4.8.0'
end

group :development, :staging do
  gem 'meta_request', '~> 0.4.3'
end

group :development do
  gem 'rb-fsevent', '~> 0.9.8', require: false
  gem 'guard-rspec', '~> 4.7.3', require: false
  gem 'listen', '~> 3.1.5'
  gem 'annotate', '~> 2.7.1'
  gem 'zeus', '~> 0.15.13', require: false
  gem 'better_errors', '~> 2.1.1'
  gem 'web-console', '~> 3.5.1'
  gem 'awesome_print', '~> 1.7.0'
  gem 'binding_of_caller'
end

group :test do
  gem 'capybara', '~> 2.6.2'
  gem "rspec-rails", '~> 3.6.0'

  gem 'cucumber-rails', '~> 1.5.0', require: false # require: false is needed for cucumber-rails

  gem 'selenium-webdriver', '~> 2.53.4'

  # Launchy is needed by Capybara, e.g. save_and_open command needs Launchy to open a browser
  gem 'launchy', '~> 2.1'
  gem 'email_spec', '~> 2.1.1'
  gem 'timecop', '~> 0.8.1'
  gem 'rack-test', '~> 0.6.3'
  gem 'database_cleaner', '~> 1.6.1'
  gem 'connection_pool', '~> 2.2.1'
  gem 'rails-controller-testing', '~> 1.0.2'

  # required for CircleCI automatic test balancing
  gem 'rspec_junit_formatter'

  gem 'fake_stripe', git: 'https://github.com/ithouse/fake_stripe.git', ref: '6848daab104333b2c0c493ab069731d4a0b87f6f'
end

group :development, :test do
  gem 'pry-byebug'
end


gem 'therubyracer', '~> 0.12.3', platforms: :ruby
gem 'js-routes', '~> 1.3.3'

# Color utilities needed for landing page
gem 'color', '~> 1.8'

gem 'uuidtools', '~> 2.1.5'
gem 'transit-ruby', '~> 0.8.1'

# Markdown parser
gem 'redcarpet', '~> 3.4.0'

gem 'intercom'

gem 'twitter_cldr'
gem 'memoist'
gem 'biz'

Я не знаю, что делать дальше, это мой первый раз, используя sharetribe с открытым исходным кодом

...