I have used Rails 4
I am using gem 'god' for restarting sidekiq if server crashes.
But after deploying through capistrano getting error.
The server is not available (or you do not have permissions to access it)
I have tried with different commands.
bundle exec god start
god status
god load 'path_to_config_god'
All commands showing the same error.
How can I get it run?
Please give some advice.
Thanks
Related
I downloaded and installed Ruby, Ruby gems and with it installed Jekyll. Started a test project with Jekyll. Want to deploy it on Heroku (because gh-pages don't support plugins on Jekyll).
Read docs on Heroku for ruby, downloaded and installed JDK 8 and JRuby 9.1.17.0. Installed bundler.
Logged in Heroku, and executed following commands in terminal:
heroku create
git push heroku master
heroku open
The new heroku app build succeeded but the website fails to load. It displays error like so:
This is the error displayed when I check heroku logs
I also built a Procfile in the root folder for the test project. Entered the following code:
web: puma -t 5:5 -p ${PORT:-3000} -e ${RACK_ENV:-development}
I'm not sure what went wrong. Please help!
You need to figure out what's your web-server by default. As advised by Roberto, it might be puma.
By the default, when you run rails new, it always has the web-server gem (puma, passenger, unicorn or anything else).
It seems that you've copied some settings? And that's why you don't have puma in Gemfile, but trying to run it. You might share the Gemfile list to let you know what's wrong.
I am running a rails server on an Ubuntu EC2 instance and have run into an issue when it comes to deploying (and restarting) my server. The odd thing is; everything seems to work fine when I start a vanilla server (rails server), but when I start the server as a daemon it does not reset (rails server -d).
I use Capistrano to do deployment. As far as I can tell there is no issue; it pulls down my latest branch, runs migrations and does a touch tmp/restart.txt. I had tried making my tmp/restart.txt a shared file, but that does not seem to be the issue (although it is a configuration I think I'll keep). After discovering Capistrano is likely working as expected I tried sshing into the server and running touch tmp/restart.txt myself. It works for the vanilla server but not the daemon.
Has anyone seen this issue before? If there is more info I could provide please let me know!
Env:
ruby 2.6.3p62 #/home/deploy/.rvm/rubies/ruby-2.6.3/bin/ruby
Rails 5.2.3 #/home/deploy/.rvm/gems/ruby-2.6.3/bin/rails
Bundler version 2.1.2 #/home/deploy/.rvm/gems/ruby-2.6.3/bin/bundle
Node v13.8.0 #/home/deploy/.nvm/versions/node/v13.8.0/bin/node
My logs, tmp, and config/master.key are shared as part of my Capistrano setup.
are you using puma or unicorn or passenger? apache or nginx? restarting the process depends more on that than anything.
personally, I like using Passenger with apache and when I restart apache, the passenger process restarts automatically.
I just published my rails app to Openshift and I got the error message:
We're sorry, but something went wrong.
The log file says:
Could not find rake-10.4.2 in any of the sources (Bundler::GemNotFound)
I do not know how to debug this issue. This has happened to about 3 apps I have deployed in the last couple of hours.
Hers is a link to the full ruby log file:
https://gist.github.com/kinsomicrote/e3715be509a7375758ef
Seems that you have problems with gems and passanger.
Did you run bundle install on the host? (if you have Gemfile)
If you already do, try to install puma or thin, and start webserver running bundle exec puma -b 0.0.0.0:8080 -d
to check if it working. Passanger sometimes is hard to setup.
I updated a gem(rtf) in my ruby on rails app through the Gemfile. The app works fine on my localhost but when I pushed changes to heroku and tried 'bundle install' within heroku bash. I see that the gem has been installed based on the log
Using rtf (0.3.3)
Following this, I did a
heroku restart --a myapp
however, when i tried the app on heroku, it still cant recognize the lib installed through the gem, i get the following error(normally appears when the library cannot be reached for command "require 'RTF'").
cannot load such file -- RTF
What am I doing wrong in heroku?
I think you misunderstand how Heroku works. When you run a bash shell on your app, nothing you do on that dyno will affect any other dynos for your app (like your web dynos). Heroku runs bundle install for you when you deploy your app and if your Gemfile is configured correctly all the gems will be installed.
the answer by sevenseacat is right- i had just got the case wrong-
require 'rtf'
works fine. In OSX, it ignores case in the command require 'RTF'
This is my first stab at Ruby on Rails. Just deployed a very simple app to Heroku.
The thing is that my app runs flawlessly on mongrel development; When I run it with "mongrel_rails start -e production" however, I get the error "We're sorry, but something went wrong."
For the life of me, I couldn't debug this. Heroku logs is not returning anything, the Exceptional addon in Heroku is not returning anything, and I cannot find mongrel.log on my Windows machine (when I run mongrel using: mongrel_rails start -e production -d"
I'm using Rails 2.3.5 and sqlite3 with bundler to pack my gems.
I was told that probably rails is not booting up correctly. I can't find any other way to diagnose this. Any ideas?
Thanks,
ANaimi
Take a look at your log/production.log file. That should contain detailed information about what's going on. It will usually contain a line that specifies the name of a gem that needs to be installed.
Heroku doesn't use mongrel, so I'm assuming that's what you're trying to do to figure out why it isn't working when you push it to heroku.
I've found, in most cases, my heroku problems have been because of uninstalled gems. Make sure you create a gem manifest.
Try tailing logs while booting up. From the terminal in the log directory do: tail -f *.log and then launch the app from another terminal (likely it's development.log since you're probably running in development mode.)
Not sure if this got definitively answered, however, check your '%app_root%/config/environments/' folder, and compare 'development.rb' to 'production.rb'.
Make sure that you have all necessary settings in the production.rb file - might have missed something important there.