I've got a website running on RefineryCMS for some time already. However there's one thing I cannot figure out. Images uploaded via CMS do not work in the production environment. It works fine in development on my local machine, but in production on the server it does not work.
This issue has been discussed before but none of the solutions I found helped to resolve my issue.
The image is uploaded to the public folder correctly, I can find it when I enter the path of folders and name of the image itself to the browser. The image is there, but it seems the app cannot decode the hashed URL that is generated for the image.
The app is running on a custom VPS on digitalocean with Ubuntu, nginx and passenger. I'm deploying via capistrano if that matters.
Thank you for any help.
Probably figured this out by now but I just ran into the same issue and realized I hadn't installed imagemagick yet.
For some reason I was thinking that came standard now on Ubuntu but it isn't.
$ sudo apt-get install imagemagick
Related
Ok, I'm deploying my Rails App using Capistrano. I'm also using Puma. I've followed this tutorial to get it to work, although I'm using Debian rather then Ubuntu.
Everything works fine and I can deploy my app without issues. However if my server crashes or the server restarts, the App doesn't restart itself and the only way I got it to restart was deploying it again with the following command cap production deploy from within my App in my local machine, which we all can agree that's not ideal.
There's loads of information on the web on how to deploy a Rails App with Passenger, which I'd rather avoid to use due to lack of resources on the server part. I've also found this tutorial which seems to be a bit outdated.
Can someone please point me to an updated tutorial or give some directions on how I could get my App to start/restart who the server?
Many thanks
EDIT
As per #mudasobwa's comments, I'm detailing the steps I've taken after reading this page:
I have copied the contents of https://github.com/puma/puma/blob/master/tools/jungle/init.d/puma into /etc/init.d/puma made it executable. I've also copied the contents of https://github.com/puma/puma/blob/master/tools/jungle/init.d/run-puma into /usr/local/bin/run-puma also made it executable.
Lastly I've created a puma.conf file in /etc.
After that I've created the following directory: /path/to/app/tmp/puma and added these two files: pid and state. Note that I've also added the aforementioned folders into Capistrano's shared links structure.
After the above I've restarted my server and the App did not start as I expected.
What am I missing here?
Well, I am not sure where to start.
We have rails based apps.
We did nothing in our websites. (did not touch ANY config file etc).
Just a regular apt-get update, upgrade.
Suddenly 2 websites are down!
What can be the problem?
This is an ubuntu machine that we are running.
DNS is OK.
We can go to the root page that says: ubuntu... everything is working fine.
We have apache server. Tried to: sudo apachectl restart.
Also, working on AMAZON cloud if it matters (aws.amazon)
Tried to reboot from Amazon. Same result.
If anything goes wrong, the first thing you should try is to follow the official troubleshooting guide: https://www.phusionpassenger.com/library/admin/apache/troubleshooting/ruby/
I have a rails app that needs to be put online (anywhere) - I am using a windows machine, I tried to deploy it using Heroku but that was a huge pain. The app only needs to go online so I can show it to someone - It only needs to be up about a week, so setting up a Virtual Linux system on my windows laptop is not a preference for me.
It sounds like you need to follow a specific procedure to get Gemfile.lock to work for Heroku. This answer has some basic instructions: https://stackoverflow.com/a/21488679/693349
However, you'd probably do better to read the full Heroku docs about "Deploying a Ruby Project Generated on Windows": https://devcenter.heroku.com/articles/bundler-windows-gemfile.
Have you tried Digital Ocean?
https://www.digitalocean.com/features/one-click-apps/ruby-on-rails/
Normally deployment at heroku works like charm, what was the problem?
Try Capistrano gem. Is an especific gem to deploy Ruby on Rails projects and it works perfect!
You have a good tutorial here to configure Capistrano.
I have made an app with the use of Git and Heroku.
I'm curious if i can deploy Ruby on Rails locally without using Git.
If you aren't going to deploy to Heroku, you don't technically need Git at all. Just delete the .git folder. Given that Git is a great tool however, doing this is a bad idea.
You can deploy a Rails app locally, and the typical way to do this is with Apache and Passenger ( I'm assuming you are using a flavor of linux, OSX may have a host running already ).
It has been a while since I had done this, but this page seems to have the right idea:
https://nathanhoad.net/how-to-ruby-on-rails-ubuntu-apache-with-passenger
Rails s or rails server (in terminal) and you have localhost:3000. This is your local rails program and is incredibly convienent for development. Of course you need to be in the directory of your program to deploy it on localhost
I'm having this issue since yesterday and I am not sure what could be the problem. I have a Rails application that I want to run against a remote SDK installed on my VirtualBox (Ubuntu); yesterday I was able to set it up on another VM I have and when I went to Settings in Rubymine and added the SSH credentials, it took some time but finally a lot of gems were downloaded and I was able to run the project directly from Rubymine environment, trying to prepare everything for debug.
I had to change my VirtualBox and now when I connect to it via SSH it starts "Collecting files..." for a while and then "Downloading..." the gems... it looks like it restarts for a couple of times and then at some point, after a while and without any further notice, it stops.
If it helps, my host is Windows 7, my guest is Ubuntu 14.04; my RVM is 1.9.3-p392.
Any ideas? I'm surprised because this worked like a charm yesterday and today is not. Thank you in advance for any help.
What version is your Rubymine? I had issue back with version 6.x with remote rubies freezing the system. Also are you using a Vagrant box? I have seen some of the Vagrant boxes have issues as well. I would log in to the Ubuntu Guest via command line/SSH and see if you still have issues downloading gems.