Ruby/Jekyll requirement errors when serving - ruby-on-rails

I recently installed Windows Subsystem for Linux and I'm running the Ubuntu distro on my Windows 10 computer. I installed Python, pip, Ruby, and Jekyll and they are all confirmed to be installed properly when I run the --version flags.
I am trying to run and modify a Jekyll theme called Mediumish locally on my computer. When following the author's instructions (i.e. run bundle and run jekyll serve --watch), I encounter the following errors:
Traceback (most recent call last):
5: from /usr/local/bin/jekyll:23:in `<main>'
4: from /usr/local/bin/jekyll:23:in `load'
3: from /var/lib/gems/2.5.0/gems/jekyll-3.8.6/exe/jekyll:11:in `<top (required)>'
2: from /var/lib/gems/2.5.0/gems/jekyll-3.8.6/lib/jekyll/plugin_manager.rb:48:in `require_from_bundler'
1: from /usr/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:in `require'
/usr/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:in `require': cannot load such file -- bundler (LoadError)
I have tried submitting issues to the author's Github account, but it appears he has stopped replying (and maintaining) this theme for a few months.
I found another Stackoverflow post titled Ruby/Jekyll unknown error when running -watch — which is very similar to what I'm experiencing. I have tried the recommended solutions from this post which are to run the jekyll build --watch and jekyll serve --watch commands, but the same errors occur.
I was able to successfully run this theme a few months ago, but after reformatting my computer, reinstalling all my applications from scratch, and cloning a new copy of the theme from the author's website, I am unable to serve the website locally thus impeding me from viewing any modifications I make to the blog theme.

I ran the gem update --system command and my Jekyll theme almost served locally.
I received the following error:
Error: could not read file /mnt/c/Users/muyga/Desktop/mediumish-theme-jekyll/vendor/bundle/gems/jekyll-3.8.5/lib/site_template/_posts/0000-00-00-welcome-to-jekyll.markdown.erb: Invalid date '<%= Time.now.strftime('%Y-%m-%d %H:%M:%S %z') %>': Document 'vendor/bundle/gems/jekyll-3.8.5/lib/site_template/_posts/0000-00-00-welcome-to-jekyll.markdown.erb' does not have a valid date in the YAML front matter. ERROR: YOUR SITE COULD NOT BE BUILT: ------------------------------------ Invalid date '<%= Time.now.strftime('%Y-%m-%d %H:%M:%S %z') %>': Document 'vendor/bundle/gems/jekyll-3.8.5/lib/site_template/_posts/0000-00-00-welcome-to-jekyll.markdown.erb' does not have a valid date in the YAML front matter.
In order to fix that error, I modified my config.yml file and added vendor to the exclude: category to exclude that folder within my theme folder.
Now when I run bundle exec jekyll serve --watch the theme serves properly.
Thanks to #JayDorsey and Jekyll: Error: Site could not be built, wrong date format
for the solutions!

Related

redminex installation, rake redmine:plugins:migrate "Cannot load such file", "load error"

I am setting up a machine running:
ruby 3.0.4-p208
passenger 6.0.14
redmine 5.0.1.stable
redmineUP latest version of all plugins
mysql2 5.7
I'm trying to install redmineX, which theoretically plays well and requires redmineUP. RedmineUP is installed and is more-or-less running. I'm having an error during the install:
bundle exec rake redmine:plugins:migrate RAILS_ENV=redmine_test
fails with the error:
cannot load such file -- redmine_x_ux_upgrade/view_projects_hook (LoadError)
/home/test_user/.gem/ruby/3.0.4/gems/zeitwerk-2.5.4/lib/zeitwerk/kernel.rb:35:in `require'
/home/test_user/.gem/ruby/3.0.4/gems/zeitwerk-2.5.4/lib/zeitwerk/kernel.rb:35:in `require'
/home/test_user/.gem/ruby/3.0.4/gems/activesupport-6.1.6/lib/active_support/dependencies/zeitwerk_integration.rb:51:in `require_dependency'
/home/test_user/redmine-5.0.1/plugins/000_redmine_x_ux_upgrade/init.rb:22:in `<top (required)>'
/home/test_user/redmine-5.0.1/lib/redmine/plugin_loader.rb:31:in `load'
- GEM PATHS:
- /home/test_user/.gem/ruby/3.0.4
- /opt/rubies/ruby-3.0.4/lib/ruby/gems/3.0.0
The file in question exists:
/home/test_user/redmine_test/plugins/000_redmine_x_ux_upgrade/lib/redmine_x_ux_upgrade/view_projects_hook.rb
Ideas?
Since this is occurring at the bundle exec rake, rather than in the redmine app, I'm assuming this issue is with the user GEM_PATH. I've tried tweaking GEM_PATH to also contain
/home/test_user/redmine_test/
/home/test_user/redmine_test/plugins/
with no success.
This turned out to be a versioning problem; using plugins written for redmine 4.x in a redmine-5.x environment.
The main problem was the vendor's helpdesk reformatted email so well-formatted plain-text with blank line separated error and log output ended up all run together. After turning all logs, error output, directory listings, etc. into separate files and attaching them, they could read the main part of the mail and identify the problem.

Rails Web application could not be started

Getting this error even when I create a new project. I installed Ruby and RoR through RVM
cannot load such file -- /var/lib/gems/2.3.0/gems/passenger-5.0.30/src/ruby_supportlib/phusion_passenger (LoadError)
/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'
/var/lib/gems/2.3.0/gems/passenger-5.0.30/src/helper-scripts/rack-preloader.rb:74:in `init_passenger'
/var/lib/gems/2.3.0/gems/passenger-5.0.30/src/helper-scripts/rack-preloader.rb:155:in `<module:App>'
/var/lib/gems/2.3.0/gems/passenger-5.0.30/src/helper-scripts/rack-preloader.rb:30:in `<module:PhusionPassenger>'
/var/lib/gems/2.3.0/gems/passenger-5.0.30/src/helper-scripts/rack-preloader.rb:29:in `<main>'
I think I found that the problem is in the directory of the gems. I do not know how to change it on Ubuntu
I would first try to understand if you have a problem with the app or the environment.
Try to run the simplest app by:
rails new simple_app
if it doesn't work - the problem is the environment.
if it does work - probably you have some problem with the initializers or config files
Let us know how it works for you!
Have you try gem install passenger ?
or gem install bundler
Your error message:
cannot load such file -- /var/lib/gems/2.3.0/gems/passenger-5.0.30/src/ruby_supportlib/phusion_passenger (LoadError)
Suggests a permission problem with files in the gem /var/lib/gems/2.3.0/gems/passenger-5.0.30. Either, the files don't exist, or they aren't readable.
If you query the permissions for that file (make sure to append '.rb'):
ls -l /var/lib/gems/2.3.0/gems/passenger-5.0.30/src/ruby_supportlib/phusion_passenger.rb
You'll probably find it's not world readable, or at least not readable by the web server process' user. If it doesn't exist, then you should reinstall.
I saw this error on a system that had a umask of 0066, which caused passenger's gem files to be root:root with mode -rw-------.

Apache-Passenger can't start my production rails application

I'm new to deploying rails applications and for what I read in many sites the Apache/Passenger combo was one of the simplest ones; however I have encountered that Passenger does not want to start my application and displays the following error message when entering the sudo tail -50 /var/log/apache2/error.log
command:
Could not spawn process for application /home/test/Documents/sites/depot:
An error occured while starting up the preloader.
Message from application: cannot load such file -- bundler/setup (LoadError)
/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:53:in `require'
/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:53:in `require'
/usr/lib/ruby/vendor_ruby/phusion_passenger/loader_shared_helpers.rb:406:in
`activate_gem'
...
age/Cor/Req/CheckoutSession.cpp:252 ]: [Client 1-1] Cannot checkout session
because a spawning error occurred. The identifier of the error is 6ce15bbe.
Please see earlier logs for details about the error.
I suspect it has to do with my ruby installation, I used rbenv and got the 2.2.3 version but in the error message it was linking to a 2.0.0 version which I have never installed.
I also suspect that it has something to do with me using this two commands from another guide:
sudo rm /usr/bin/ruby
sudo ln -s /usr/local/bin/ruby /usr/bin/ruby
https://www.digitalocean.com/community/tutorials/how-to-deploy-a-rails-app-with-passenger-and-apache-on-ubuntu-14-04
If anybody know how to fix this headache of a problem I'll really appreciate it.
Thanks!
You probably need to specify correct PassengerDefaultRuby in your httpd.conf file.
My recommendation is to go through the installation of passenger using their official guide:
https://www.phusionpassenger.com/library/install/apache/
After some clues left by #dimakura and #CamdenNarzt I was able to solve this in two stages.
As I suspected Passenger was using the wrong version of ruby, to fix this I modified the passenger.conf file located under /etc/apache2/mods-available/ with the output of the which ruby command:
Added the line (replace with your own which ruby output)
PassengerRuby /home/test/.rbenv/shims/ruby
Restarted apache got a "Incomplete response received from application" error message, checked the logs and noticed that the proper version of ruby was now being used but got an error message:
"Missing secret_token and secret_key_base for 'production' environment, set these values in config/secrets.yml"
Installed the Figaro gem by following the instructions on this site: https://www.twilio.com/blog/2015/02/managing-development-environment-variables-across-multiple-ruby-applications.html then generated a secret key using the command:
rake secret
Copied the output and opened the config/application.yml file where I entered:
SECRET_KEY_BASE: [output key from rake secret command]
Restarted Apache and it worked!!

Phusion Passenger with Apache troubleshooting - openSSL load error, link time reference?

I'm past all this now and trying to fix the problem not in quotes down below, but leaving for background information.
I am trying to get a working rails development environment on my LAMP
stack, so I've installed rbenv, the 2.1.2 version of ruby, the 4.1.4
version of Rails and the phusion mod for Apache. I'm now seeing very
strange errors when I try to stop and start my Apache service and I
think the issue is that Phusion has rebuilt the Apache installation on
the machine and Apache is now looking for configuration files in
/etc/apache2/. I'm now struggling to find out how to fix apache to
look in the LAMP directories for httpd.conf.
Here are some examples of the errors.
$ sudo service apache2 restart
* Restarting web server apache2
(98)Address already in use: AH00072: make_sock: could not bind to address [::]:80
(98)Address already in use: AH00072: make_sock: could not bind to address 0.0.0.0:80
no listening sockets available, shutting down
AH00015: Unable to open logs
Action 'start' failed.
The Apache error log may have more information.
$ sudo /opt/lampp/lampp restart
Restarting XAMPP for Linux 1.8.3-4...
XAMPP: Stopping Apache...fail.
apachectl returned 1.
XAMPP: Stopping MySQL...ok.
XAMPP: Stopping ProFTPD...not running.
XAMPP: Starting Apache...already running.
XAMPP: Starting MySQL...ok.
XAMPP: Starting ProFTPD...fail.
XAMPP: Another FTP daemon is already running.
Also, this is how I've modified the config file in
/opt/lampp/etc/httpd.conf. I know the module is supposed to be a .so
file but I did not see one in my directory (didn't really spend enough
time looking into this to know how to fix it, do I need to compile
something?)
LoadModule passenger_module /home/moody/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/passenger-4.0.45/ext/apache2/mod_passenger.c
PassengerRoot /home/moody/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/passenger-4.0.45
PassengerRuby /home/moody/.rbenv/versions/2.1.2/bin/ruby
Server is running Ubuntu 14.04. Install order was LAMP (1.8.3-4), Ruby
1.9.3 (via apt-get), then rbenv, then ruby-build, then installed Ruby 2.1.2, then removed Ruby 1.9.3 via apt-get remove, then installed rails gems, then installed phusion for Apache and the ruby gem for
phusion.
Edit 1: I found out it's actually an issue with my LoadModule file
paths
I checked out the actual LAMPP script to see where the apachectl
returned 1 error was coming from and it was just running
/opt/lampp/bin/apachectl, so then I ran the same command
/opt/lampp/bin/apachectl -k stop and it gave me a very descriptive
error:
httpd: Syntax error on line 160 of /opt/lampp/etc/httpd.conf: Cannot load /home/moody/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/passenger-4.0.45/ext/apache2/mod_passenger.c into server: /home/moody/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/passenger-4.0.45/ext/apache2/mod_passenger.c: invalid ELF header
Commented out my lines-need to figure out how to get the appropriate
.so file.
Edit 2:
I ran the passenger-install-apache2-module installer and it seemed to work fine and told me the lines to add to my program (including the .so file which I was missing before)
Now I'm running into a far more confusing error that I think is related to the version of GCC that is available for ubuntu 14.04 and I can't find any resources on the internet that deal with this problem
httpd: Syntax error on line 160 of /opt/lampp/etc/httpd.conf: Cannot load /home/moody/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/passenger-4.0.45/buildout/apache2/mod_passenger.so into server: /opt/lampp/lib/libstdc++.so.6: version `GLIBCXX_3.4.9' not found (required by /home/moody/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/passenger-4.0.45/buildout/apache2/mod_passenger.so)
Saw this in another google search to see which GCC versions are available, apparently 3.4.9 isn't one of them (go figure, that's what the error says.) Any ideas on how I can remedy this?
$ strings /opt/lampp/lib/libstdc++.so.6 | grep -i glibcxx
GLIBCXX_3.4
GLIBCXX_3.4.1
GLIBCXX_3.4.2
GLIBCXX_3.4.3
GLIBCXX_3.4.4
GLIBCXX_3.4.5
GLIBCXX_3.4.6
GLIBCXX_3.4.7
GLIBCXX_3.4.8
GLIBCXX_FORCE_NEW
Edit 3: It's 6 AM and I think I figured it out at last.
I did a few searches and found this post here:
/usr/lib/libstdc++.so.6: version `GLIBCXX_3.4.15' not found
And then I did a find on the root directory
find / | grep -i libstdc++.so
And used the strings command I found earlier-the libstdc++.so had GLIBCXX_3.4.9 in the directory /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.19 so I backed up the old one with mv and copied the new one to the lampp directory. Restarted the server and got no errors. Supposedly I have a working rails stack now :)
Edit 4:
Welp, Phusion is working, but there's a new problem... Now when I navigate to my new virtual host (RailsEnv set to development) I get this lovely stack trace on a bunch of code I have no experience with. Seems like something's wrong with the sha1.so referencing some unknown symbol that's supposed to be in libcrypto.so.1.0.0. What the heck is link time reference?
Interestingly, if I just navigate to the application folder and do rails server, I can see the application without issue. Does the application need to be generated? (i.e. call rails generate)?
/home/moody/.rbenv/versions/2.1.2/lib/ruby/2.1.0/x86_64-linux/digest/sha1.so: symbol SHA1_Init, version OPENSSL_1.0.0 not defined in file libcrypto.so.1.0.0 with link time reference - /home/moody/.rbenv/versions/2.1.2/lib/ruby/2.1.0/x86_64-linux/digest/sha1.so (LoadError)
/home/moody/.rbenv/versions/2.1.2/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
/home/moody/.rbenv/versions/2.1.2/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
/home/moody/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/bundler-1.6.3/lib/bundler/definition.rb:1:in `<top (required)>'
/home/moody/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/bundler-1.6.3/lib/bundler.rb:153:in `definition'
/home/moody/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/bundler-1.6.3/lib/bundler.rb:116:in `setup'
/home/moody/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/bundler-1.6.3/lib/bundler/setup.rb:17:in `<top (required)>'
/home/moody/.rbenv/versions/2.1.2/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:135:in `require'
/home/moody/.rbenv/versions/2.1.2/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:135:in `rescue in require'
/home/moody/.rbenv/versions/2.1.2/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:144:in `require'
/home/moody/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/passenger-4.0.45/lib/phusion_passenger/loader_shared_helpers.rb:258:in `block in run_load_path_setup_code'
/home/moody/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/passenger-4.0.45/lib/phusion_passenger/loader_shared_helpers.rb:361:in `running_bundler'
/home/moody/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/passenger-4.0.45/lib/phusion_passenger/loader_shared_helpers.rb:256:in `run_load_path_setup_code'
/home/moody/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/passenger-4.0.45/helper-scripts/rack-preloader.rb:100:in `preload_app'
/home/moody/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/passenger-4.0.45/helper-scripts/rack-preloader.rb:158:in `<module:App>'
/home/moody/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/passenger-4.0.45/helper-scripts/rack-preloader.rb:29:in `<module:PhusionPassenger>'
/home/moody/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/passenger-4.0.45/helper-scripts/rack-preloader.rb:28:in `<main>'
The errors you are getting says that port [:80] is already in use so checking which process has that port occupied and killing that process might be the fix for you. You can do this by running
sudo kill $(sudo lsof -t -i:80)
or
sudo kill sudo lsof -t -i:9001
After the process gets terminated, try restarting the apache server.
I had a very similar error like yours which is regarding the OPENSSL version.
You can refer this post. https://groups.google.com/forum/?hl=en#!topic/phusion-passenger/6nRi0FU98_g
For my case, I resolved it by changing my apache version to 2.2.22

Rails app doesn't run on AWS Elastic Beanstalk, sqlite3 error

I have been trying to get started running Rails on AWS' Elastic Beanstalk, but I have run in to a seemingly insurmountable obstacle: While I am able to spin up a new Elastic Beanstalk running the sample application, I cannot seem to get an EB instance to successfully run my own code.
Here are the steps I have taken:
Locally running ruby 1.9.3p545 on OSX 10.9.3
Installed aws-eb client tools.
Scrupulously followed the following tutorial from Amazon: Deploying a Rails Application to AWS Elastic Beanstalk (tl;dnr: use 'rails new' to create a new rails app, commit to git and then use 'eb init' to create an EB instance of the type '64bit Amazon Linux 2014.03 v1.0.3 running Ruby 1.9.3' and then running 'eb start')
After waiting a seeming eternity for the EB instance to be created, I navigate to the url Amazon provides.
Instead of seeing my rails app (which, by the way, runs fine locally), I get the dreaded "We're sorry, but something went wrong" page:
I have tried these steps multiple times, with the same results. I have tried using different environments (the Ruby 2.0.0 Puma and Passenger ones, for instance, updating my ruby via rvm as necessary).
Before this is flagged as a duplicate, let me state straight away that I have looked at the following questions and found that they have not solved my problem:
AWS Elastic Beanstalk: Launching a new Rails App
Deploying an existing Rails app to AWS Elastic Beanstalk
Following the advice in the question "AWS Elastic Beanstalk: Launching a new Rails App", which seems very similar to my issue, I let the app run over night and I am still getting the error.
I've ssh'd in to the instance. Interestingly, both production.log and development.log appear to be empty (the ones in /var/app/support/logs, anyway). However, I find the following in passenger.log:
********* snip *********
[ 2014-06-12 21:42:38.8400 5133/7fe66aee4700 agents/HelperAgent/RequestHandler.h:2210 ]: [Client 20] Cannot checkout session.
Error page:
cannot load such file -- sqlite3/sqlite3_native (LoadError)
/usr/local/share/gems1.9/gems/sqlite3-1.3.9/lib/sqlite3.rb:6:in require'
/usr/local/share/gems1.9/gems/sqlite3-1.3.9/lib/sqlite3.rb:6:inrescue in '
/usr/local/share/gems1.9/gems/sqlite3-1.3.9/lib/sqlite3.rb:2:in <top (required)>'
/usr/local/share/gems1.9/gems/bundler-1.6.2/lib/bundler/runtime.rb:76:inrequire'
/usr/local/share/gems1.9/gems/bundler-1.6.2/lib/bundler/runtime.rb:76:in block (2 levels) in require'
/usr/local/share/gems1.9/gems/bundler-1.6.2/lib/bundler/runtime.rb:72:ineach'
/usr/local/share/gems1.9/gems/bundler-1.6.2/lib/bundler/runtime.rb:72:in block in require'
/usr/local/share/gems1.9/gems/bundler-1.6.2/lib/bundler/runtime.rb:61:ineach'
/usr/local/share/gems1.9/gems/bundler-1.6.2/lib/bundler/runtime.rb:61:in require'
/usr/local/share/gems1.9/gems/bundler-1.6.2/lib/bundler.rb:132:inrequire'
/var/app/current/config/application.rb:7:in <top (required)>'
/var/app/current/config/environment.rb:2:inrequire'
/var/app/current/config/environment.rb:2:in <top (required)>'
config.ru:3:inrequire'
config.ru:3:in block in <main>'
/usr/local/share/gems1.9/gems/rack-1.5.2/lib/rack/builder.rb:55:ininstance_eval'
/usr/local/share/gems1.9/gems/rack-1.5.2/lib/rack/builder.rb:55:in initialize'
config.ru:1:innew'
config.ru:1:in <main>'
/usr/local/share/gems1.9/gems/passenger-4.0.41/helper-scripts/rack-preloader.rb:112:ineval'
/usr/local/share/gems1.9/gems/passenger-4.0.41/helper-scripts/rack-preloader.rb:112:in preload_app'
/usr/local/share/gems1.9/gems/passenger-4.0.41/helper-scripts/rack-preloader.rb:158:in'
/usr/local/share/gems1.9/gems/passenger-4.0.41/helper-scripts/rack-preloader.rb:29:in <module:PhusionPassenger>'
/usr/local/share/gems1.9/gems/passenger-4.0.41/helper-scripts/rack-preloader.rb:28:in'
App 5241 stdout:
App 5241 stdout:
[ 2014-06-12 21:45:26.2512 5133/7fe66d1ef700 Pool2/Implementation.cpp:883 ]: Could not spawn process for group /var/app/current#default: An error occured while starting up th$
in 'void Passenger::ApplicationPool2::SmartSpawner::handleErrorResponse(Passenger::ApplicationPool2::SmartSpawner::StartupDetails&)' (SmartSpawner.h:455)
in 'std::string Passenger::ApplicationPool2::SmartSpawner::negotiatePreloaderStartup(Passenger::ApplicationPool2::SmartSpawner::StartupDetails&)' (SmartSpawner.h:566)
in 'void Passenger::ApplicationPool2::SmartSpawner::startPreloader()' (SmartSpawner.h:206)
in 'virtual Passenger::ApplicationPool2::ProcessPtr Passenger::ApplicationPool2::SmartSpawner::spawn(const Passenger::ApplicationPool2::Options&)' (SmartSpawner.h:752)
in 'void Passenger::ApplicationPool2::Group::spawnThreadRealMain(const Passenger::ApplicationPool2::SpawnerPtr&, const Passenger::ApplicationPool2::Options&, unsigned in$
******** end snip ********
Not sure if sqlite3 is the problem or not, but it does appear to be installed on the instance. Just in case, I installed the sqlite3 gem again.
Here is the output of passenger-status:
Version : 4.0.41
Date : 2014-06-13 13:25:52 +0000
Instance: 5148
----------- General information -----------
Max pool size : 6
Processes : 0
Requests in top-level queue : 0
----------- Application groups -----------
/var/app/current#default:
App root: /var/app/current
Requests in queue: 0
I'm no expert, but it seems like passenger isn't running (processes == 0).
What am I missing? Is there some "JUST_WORK_DARNIT" config that I have neglected to set to true?
If, in fact, there is an issue with the sqlite3 install, as is suggested below, what can I do to resolve the issue?
Can you try installing sqlite-devel by running yum install sqlite-devel?
You may want to use ebextensions to try this out on beanstalk.
Try creating a file with path .ebextensions/00-myfile.config in your app source directory before deploying to beanstalk.
packages:
yum:
sqlite-devel: []
Sounds similar to the problem discussed here Why can't I install the SQLite gem?
Let me know if that works.
Update
There is one thing that changed with Rails 4. Possibly you are hitting this issue.
See the discussion here: https://github.com/rails/rails/pull/8468
The default sample app generated by rails 4 does not work in production mode because of the above change. You can however make it work by modifying the sample app to include a non-default web page.
I tried the following:
After running "rails new appname", "git init", "eb init" try the following steps. (Based on this answer).
Edit config/routes.rb so that it contains root :to => 'proto#index'
Create app/controllers/proto_controller.rb with the following contents
class ProtoController < ApplicationController
def index
end
end
Create file app/views/proto/index.html.erb and write something in that file ... 'Hello World'.
Then launch your environment. That should work.
When I try without following the above three steps then I also get an error page. But with these changes I do not see an error page.
I would recommend you perform the above steps in a fresh directory on a new environment. I tested with the latest Ruby solution stack "64bit Amazon Linux 2014.03 v1.0.4 running Ruby 2.0 (Puma)".
Also at some point when you get to Step 6 on this tutorial, you might end up replacing gem 'sqlite3' with gem 'mysql2' but that is the next step after you get the sample app running.
Yes, the sqlite3 gem is the problem. It is installed, but not correctly installed. A key file (namely the sqlite3_native library file) is missing.

Resources