user7492670
user7492670

Reputation:

Rails file not working on webserver

Am I able to just plug an erb file into a web server and access it via HTTP, and have it run the ruby inside of it and output HTML? Or do I need to set up a rails project?

Upvotes: 0

Views: 33

Answers (1)

fl9
fl9

Reputation: 434

It's not enough to simply upload an erb file to a webserver. Your whole rails project needs to be on the webserver as well as the rails binary itself (to run your rails code, like you do on localhost). Usually something like Capistrano is used for an easy rails deployment, see, e.g., https://revs.runtime-revolution.com/deploy-your-rails-app-with-capistrano-5ad5d58e9b07.

Upvotes: 1

Related Questions