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

From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.

I have a banner file that is located at the path /var/www/static/images/banner.jpg. My project root folder is located at /var/www/Duelingpets-Dev. The css code works fine but when I try to get my image file to display it keeps throwing 404 error messages even I am setting it to the correct location. I don’t know what I am missing but the css file works just fine. Any help would be greatly appreciated.
Here is the banner locaton.
duelingpets-admin@DuelingpetsDev-WS1a:/var/www/static/images$ ls
banner.jpg
Here is my app file.
require "roda"
class App < Roda
opts[:root] = __dir__
plugin :render
plugin :static, ['/css'], root: ''
plugin :static, ['/images'], root: 'www/static/'
route do |r|
r.root do
#"Blah Hello from Roda served via Falcon on DigitalOcean!"
#File.read('home.html.erb')
view(:home)
end
r.on('about') do
#"A new about page to help with the project"
File.read('about.html.erb')
end
r.get('web-layout.css') do
response['Content-Type'] = 'text/css; charset=utf-8'
#File.read('web-layout.css')
File.read(File.expand_path('web-layout.css', __dir__))
end
end
end
The layout file looks like this.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>My new website</title>
<link rel="stylesheet" href="../css/reset.css?v=2">
<link rel="stylesheet" href="../css/style.css?v=2">
</head>
<body>
<p class="sidebar">Nav Bar</p>
<p class="content">Banner</p>
<img src="images/banner.jpg?v=2" alt="Web Logo" />
<main class="content">
<%= yield %>
</main>
<p class="footer">Footer</p>
</body>
</html>
384d3f11289345379905a243f7b817
IsaacMvd
Ervan Agus
Teckno
dc1bce8262314f84b368813178d9e4
gerard
gerard
Stan Flint
Stan Flint