I am building a small website. I want to have a scrolling window of news headlines, where you click on the headline and a page with a copy of the press release get s displayed.
I don’t want to run a db, so is there anyway to predefine the relationships between headline and the text file?
Assuming you mean you want a file based data store, yes, quite
possible. You can store the text files in a directory, and when your
application runs, it can scan the files and build a link in your web
page that will cause your web application to then display the
appropriate file, while still keeping the look and feel of your site.
I'd personally not do the whole Rails thing for something like this;
you might look at Sintra or Merb instead.
Where does the headline come from? Where does the text file come
from? How is the relationship determined to start with?
And whatever your reasons for not wanting to "run a db", this sounds
like an excellent case for using a document-oriented store e.g. Redis,
MongoDB, etc.
Alternatively, just serve the whole content and use JS/CSS to toggle
display of the text part.