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.
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 trying to deploy my Rails app to Google Cloud using App Engine Flexible Environment. Everything works fine when I run gcloud app deploy, but at the very end, when App Engine tries to run my application using bundle exec rails server -p $PORT, as specified in my app.yaml file, it crashes and gives the following error message:
Error Response: [9] Application startup error: 'bundler: command not
found: rails Install missing gem executables with bundle install
I tried changing the entrypoint value, running bundle install again and again, and installing all my gem files locally, but none of that worked. I also tried installing rack and changing the endpoint to run the app using rackup command, but that didn't work either. I am also skipping my gemfile.lock in my app.yaml file due to a previous error that was solved on SO.
I think you'd also want to install bundler in your container instance.
gem install bundler
The reason I was getting this error is because I was skipping the Gemfile.lock due to a previous error that I thought was solved here. The aforementioned 'solution' led to this error. The solution that I found is to make some edits to Gemfile.lock that solved the issue instead of avoiding it. The edits can be seen here.
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!!
A month ago we completed testing a standard Rails Cloud Server install process.
We installed more than a dozen Cloud Servers running Rails applications. They we took a break from installing new applications. (all that to say the process was solid)
Today we built a new cloud server and installed one of the Rails applications we have previously installed successfully. We followed the same documented process at at the very end, when issuing the passenger start command
rvm-exec ruby-1.9.3-p286 ruby -S passenger start -p 4000 -e production > /dev/null & disown
we received this error message:
ruby: No such file or directory -- passenger (LoadError)
we have been searching and cannot find this error mentioned anywhere on the net.
Has anyone seen this error before?
After some exploration we determined the passenger gem had to be installed (again) in the global gemset. We knew the passenger gem was installed, but it was not found in any of the gemsets. Installing passenger explicitly in the global gemset resolved the problem.
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.