0

So i am trying to deploy a project which i am not familiar with, I use to always run with localhost:3000/abc in development and my app will successfully load.

Then after configuring apachee/passengers , and my database.yml , i ran the site with the dns i provided
eg; ec2-11-111-xxx-xx.ap-southeast-1.compute.amazonaws.com/abc

and it gave this error enter image description here

How i run my server

rails s

=> Booting WEBrick
=> Rails 4.2.4 application starting in development on http://localhost:3000
=> Run `rails server -h` for more startup options
=> Ctrl-C to shutdown server
[2017-03-15 16:01:16] INFO  WEBrick 1.3.1
[2017-03-15 16:01:16] INFO  ruby 2.3.3 (2016-11-21) [x86_64-linux]
[2017-03-15 16:01:16] INFO  WEBrick::HTTPServer#start: pid=20856 port=3000

UPDATE 1# : ok have misunderstand how it works. So apparantly running rail s is making my system run on WEBRICK, which not what i want. My apachee is already running, but i keep getting the error same as the screen shot above after chmod 777 the tmp files , replacing a new tmp file.

Napmi
  • 521
  • 2
  • 13
  • 32

2 Answers2

0

I am quoting another post:

The user who created or 'owns" the my_rails_app directory isn't writable by the server.

Run:

chown -R webserveruser:webserveruser /path/to/my_rails_app

rails permission denied webserver error

assetsprecompile permission denied only on one computer

If you did not understand the chown -R command, you can check more informations online about this Bash (Terminal) command:

bash terminal chown -R command

So you need to run chown -R in your terminal followed by your webserveruser:webserveruser and the path to your rails application starting from the root.

If you do not know which is your server user, with phusion passenger you should run ps aux | egrep '(apache|httpd)'. For finding out I just searched online, so if you do not have apache search the correct terminal command.

How to find out Apache Webserver user

The path to your rails app should be given starting from the root directory. If you do not know what the root directory is read hear:

Wikipedia Root Directory

Linux Root Directory in the Bash terminal

Community
  • 1
  • 1
Fabrizio Bertoglio
  • 5,890
  • 4
  • 16
  • 57
  • what should i put in webserveruser ? since i am using bitnami the login is usually bitnami – Napmi Mar 16 '17 at 01:58
0

Giving write permission using chown might not work because of few replacement simultaneously. Just remove the cache folder in temp and it should work as required. Run this command in your project folder.

rm -rf ./tmp/cache
Shubham kumar
  • 712
  • 7
  • 12