помогите пожалуйста решить проблему
я на mint поставил rvm. затем поставил несколько версий ruby и создал 2 gemset:
md1@md1 /var/log/apache2 $ rvm gemset list_all
gemsets for ruby-1.9.2-p330 (found in /home/md1/.rvm/gems/ruby-1.9.2-p330)
(default)
global
gemsets for ruby-2.0.0-p643 (found in /home/md1/.rvm/gems/ruby-2.0.0-p643)
(default)
global
proj_r4_0
gemsets for ruby-2.2.1 (found in /home/md1/.rvm/gems/ruby-2.2.1)
(default)
global
=> proj_r4
gemsets for ruby-1.8.6-p420 (found in /home/md1/.rvm/gems/ruby-1.8.6-p420)
(default)
global
затем создал у проекта: первый в /home/md1/rails/proj_r4 использует rails 4.2.4 ему соответствует rvm use 2.2.1@proj_r4 (что отражено в соответствующем файле /home/md1/rails/proj_r4/.rvmrc)
второй в /home/md1/rails/proj_r4_0 использует rails 4.0.0 ему соответствует rvm use 2.0.0@proj_r4 (что отражено в соответствующем файле /home/md1/rails/proj_r4/.rvmrc)
затем поставил apache2 прописал конфиги и настроил hosts:
<VirtualHost *:80>
ServerAdmin prozaik81-2@yandex.ru
DocumentRoot /home/md1/rails/proj_r4/public
ServerName proj_r4.ru
RailsEnv production
<Directory /home/md1/rails/proj_r4/public>
Options FollowSymLinks
Require all granted
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
<VirtualHost *:80>
ServerAdmin prozaik81-2@yandex.ru
DocumentRoot /home/md1/rails/proj_r4_0/public
ServerName proj_r4_0.ru
RailsEnv production
<Directory /home/md1/rails/proj_r4_0/public>
Options FollowSymLinks
Require all granted
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
127.0.0.1 localhost proj_r4.ru proj_r4_0.ru
таким образом браузер по адресу proj_r4.ru должен показывать проект /home/md1/rails/proj_r4 , который крутится на rails4.2.4, а по адресу proj_r4_0.ru браузер должен показывать проект /home/md1/rails/proj_r4_0 , который крутится на rails4.0.0 (если не так, то поправьте меня пожалуйста!)
проблема в том, что по обоим этим адресам браузер показывает следующее сообщение об ошибке:
We're sorry, but something went wrong.
We've been notified about this issue and we'll take a look at it shortly.
Information for the administrator of this website
The Phusion Passenger application server encountered an error while starting your web application. Because you are running this web application in staging or production mode, the details of the error have been omitted from this web page for security reasons.
Please read the Passenger log file to find the details of the error.
Alternatively, you can turn on the "friendly error pages" feature (see below), which will make Phusion Passenger show many details about the error right in the browser.
To turn on friendly error pages:
Nginx integration mode
Apache integration mode
Standalone mode
вот лог апача:
[ 2015-11-08 23:04:18.3074 7652/7f46ff38d700 age/Cor/Req/CheckoutSession.cpp:253 ]: [Client 1-1] Cannot checkout session because a spawning error occurred. The identifier of the error is 747dc5c0. Please see earlier logs for details about the error.
App 7895 stdout:
App 7895 stdout:
[ 2015-11-08 23:06:49.4866 7652/7f47059f8700 age/Cor/App/Implementation.cpp:304 ]: Could not spawn process for application /home/md1/rails/proj_r4: An error occured while starting up the preloader.
Error ID: eceeb28e
Error details saved to: /tmp/passenger-error-0tPkpl.html
Message from application: cannot load such file -- bundler/setup (LoadError)
/home/md1/.rvm/rubies/ruby-2.2.1/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
/home/md1/.rvm/rubies/ruby-2.2.1/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
/usr/lib/ruby/vendor_ruby/phusion_passenger/loader_shared_helpers.rb:430:in `activate_gem'
/usr/lib/ruby/vendor_ruby/phusion_passenger/loader_shared_helpers.rb:297:in `block in run_load_path_setup_code'
/usr/lib/ruby/vendor_ruby/phusion_passenger/loader_shared_helpers.rb:435:in `running_bundler'
/usr/lib/ruby/vendor_ruby/phusion_passenger/loader_shared_helpers.rb:296:in `run_load_path_setup_code'
/usr/share/passenger/helper-scripts/rack-preloader.rb:100:in `preload_app'
/usr/share/passenger/helper-scripts/rack-preloader.rb:156:in `<module:App>'
/usr/share/passenger/helper-scripts/rack-preloader.rb:30:in `<module:PhusionPassenger>'
/usr/share/passenger/helper-scripts/rack-preloader.rb:29:in `<main>'
[ 2015-11-08 23:06:49.5176 7652/7f46ff38d700 age/Cor/Req/CheckoutSession.cpp:253 ]: [Client 1-2] Cannot checkout session because a spawning error occurred. The identifier of the error is eceeb28e. Please see earlier logs for details about the error.
вот лог приложения:
D, [2015-11-08T23:00:55.881026 #7169] DEBUG -- : [1m[36m (2.9ms)[0m [1mCREATE TABLE "schema_migrations" ("version" varchar NOT NULL) [0m
D, [2015-11-08T23:00:55.881328 #7169] DEBUG -- : [1m[35m (0.1ms)[0m select sqlite_version(*)
D, [2015-11-08T23:00:55.883703 #7169] DEBUG -- : [1m[36m (2.0ms)[0m [1mCREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")[0m
D, [2015-11-08T23:00:55.884759 #7169] DEBUG -- : [1m[35mActiveRecord::SchemaMigration Load (0.1ms)[0m SELECT "schema_migrations".* FROM "schema_migrations"
I, [2015-11-08T23:00:55.889051 #7169] INFO -- : Migrating to CreateMessages (20151108143451)
D, [2015-11-08T23:00:55.889511 #7169] DEBUG -- : [1m[36m (0.1ms)[0m [1mbegin transaction[0m
D, [2015-11-08T23:00:55.891231 #7169] DEBUG -- : [1m[35m (0.3ms)[0m CREATE TABLE "messages" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "title" varchar, "body" text, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
D, [2015-11-08T23:00:55.909989 #7169] DEBUG -- : [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "schema_migrations" ("version") VALUES (?)[0m [["version", "20151108143451"]]
D, [2015-11-08T23:00:55.925217 #7169] DEBUG -- : [1m[35m (14.6ms)[0m commit transaction
пробовал делать рестарт апача
пробовал из консоли выполнять:
rake assets:precompile
пробовал в config/application.rb прописывать
config.assets.initialize_on_precompile = false
ничего из перечисленного не помогло. помогите пожалуйста выложить проекты в web