Report this

What is the reason for this report?

Filezilla uploaded files to rails via sftp won't show up

Posted on February 7, 2017

hi,

I’m a Ruby on Rails noob, I am using the one click application which I can access via terminal ssh and browser.

I downloaded the rails project file (via SFTP Filezilla) to my local machine (Mac OS X Yosemite), I want to make changes to these files then re-upload it back to the same location via SFTP Filezilla. Therefore practically changing the file (View>Home>index.html.erb). I added a simple line of code which is a heading. But when I checked my rails home page, the change I did on the code is not reflecting. (my H1 tag is not showing up).

Is there something that I missed doing for me to edit my code and re-upload it back to my digitalocean ip directory?

Thanks!



This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

@robertcristobal

Ah, the one-click image may use rails as the default user instead of root (which is standard for base OS installations). If the files are uploading without any errors, and it’s to the correct directory, unless there’s some degree of caching, then all should work.

To test things out, I just deployed a fresh RoR one-click and logged in with rails as the user, using SFTP on Port 22, and then the password I was provided with and then navigated to:

./rails/rails_project/app/views/home

… then downloaded the index.html.erb file, removed the logo from the default file, uploaded it, and then refreshed the page and it was gone as expected.

So if you’re not seeing the changes, it would appear that the file isn’t uploading despite what may be showing.

@robertcristobal

When you login to SFTP using root, the first directory you’ll be dropped in to is /. From there you’d have to navigate to your project directory and then upload the files.

If the files are not uploading, you’d need to check the logs to see if there’s something being logged that details the issue. In FileZilla, at the top, there’s also output that should shed some light as to what is going on.

The default log directory is /var/log. We can run

tail -20 /var/log/auth.log

and

tail -20 /var/log/syslog

To see if anything pops up there.

thanks for the feedback @jtittle

I’m not sure what logging in using root means but this is the screenshot of my Filezilla connection setting

Image

The files actually uploaded, I right click on the file via Filezilla and edit it, I can see the <h1>Hello world</h1> code I inserted on my local so the file uploaded, i’m not sure why that is not showing up when I visit my droplet IP because it is still showing the page in its original state.

Thank you!

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.