apache - Rails web application error on start -


i new linux , rails , trying development server , running. have installed ruby/rails , had working under localhost:3000. can create rails app , have run.

i installed apache 2/passenger. when try hit ip address of machine getting following error:

it looks bundler not find gem. maybe didn't install gems application needs. install gems, please run:  bundle install  if didn't work, problem caused application being run under different environment it's supposed to. please check following:  app supposed run a-cjstewar user? app being run on correct ruby interpreter? below see ruby interpreter phusion passenger attempted use.  -------- exception follows: -------  not find rake-12.0.0 in of sources (bundler::gemnotfound)   /var/lib/gems/2.3.0/gems/bundler-1.15.3/lib/bundler/spec_set.rb:87:in `block in materialize'   /var/lib/gems/2.3.0/gems/bundler-1.15.3/lib/bundler/spec_set.rb:81:in `map!'   /var/lib/gems/2.3.0/gems/bundler-1.15.3/lib/bundler/spec_set.rb:81:in `materialize'   /var/lib/gems/2.3.0/gems/bundler-1.15.3/lib/bundler/definition.rb:159:in `specs'   /var/lib/gems/2.3.0/gems/bundler-1.15.3/lib/bundler/definition.rb:218:in `specs_for'   /var/lib/gems/2.3.0/gems/bundler-1.15.3/lib/bundler/definition.rb:207:in `requested_specs'   /var/lib/gems/2.3.0/gems/bundler-1.15.3/lib/bundler/runtime.rb:109:in `block in definition_method'   /var/lib/gems/2.3.0/gems/bundler-1.15.3/lib/bundler/runtime.rb:21:in `setup'   /var/lib/gems/2.3.0/gems/bundler-1.15.3/lib/bundler.rb:101:in `setup'   /var/lib/gems/2.3.0/gems/bundler-1.15.3/lib/bundler/setup.rb:19:in `<top (required)>'   /usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'   /usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55: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>' 

here app1.conf file:

<virtualhost *:80>     servername 122.112.8.102     serveradmin user@email.com     documentroot /home/username/app1/public     railsenv development     errorlog ${apache_log_dir}/error.log     customlog ${apache_log_dir}/access.log combined      <directory "/home/username/app1/public">        require granted        options followsymlinks        # relaxes apache security settings.        allowoverride none        # multiviews must turned off.        order allow,deny        allow     </directory> </virtualhost> 

ruby -v

ruby 2.4.0p0 (2016-12-24 revision 57164) [x86_64-linux] 

rails -v

rails 5.1.2 

apache2 -v

server version: apache/2.4.18 (ubuntu) 

passenger -v

phusion passenger 5.1.6 

i'm not sure go here. appreciated!

it appears running application different ruby think are.

in order ruby 2.4.0p0 app should running on, should find out ruby located with

which ruby 

then, can set executable ruby want use using passengerruby directive in <virtualhost>:

<virtualhost *:80>     passengerruby: /path/to/ruby     # other stuff </virtualhost> 

check out the documentation passengerruby directive learn more.


Comments

Popular posts from this blog

node.js - Node js - Trying to send POST request, but it is not loading javascript content -

javascript - Replicate keyboard event with html button -

javascript - Web audio api 5.1 surround example not working in firefox -