I have just taken on a new site and they were running ruby on rails for
their store. I have finally found the database but I cannot get the
store to work. I can’t even get it to show up. I have never used this
software before and have no idea where to start. All I know is the
client was upset when I told them we wou;ld have to start a new store.
They apparently have a few hundred of their products enetred and they do
have the backup. I am not sure why it won’t work. This is what I get
when I go to the domain:
Can’t write template cache in the directory:
/home/weraceha/public_html/shop/templates_c.
Please check if it exists, and have writable permissions.
I took a look at the stuff at the link you posted and all the code i
see is perl code and not ruby. i don’t think that the store runs on
rails. You have a perl store there it looks like. Sorry i can’t be of
more help.
What (or is it who) gives you the impression that this is Rails?
The directory structure linked in your first message was indeed a
collection of PERL scripts. The link in the last email gave a
redirect to a PHP file. I see no evidence of Ruby-ness and not the
slightest indication of Rails anywhere…
Ok so what is the main file breakdown for this system. I have no idea
where to look. If I had some kind of structure that would help. I found
100’s of product images in the shop directory so I thought that might be
it. But from the way this is looking it is not. The client is positive
that the previous person was using Ruby on Rails. Can someone let me
know what I should be looking for to ensure I am in the right place?
Thank you guys so much. I have never been apart of a forum that responds
this quick with so many respoonses. Makes me want to use only this code.
responds
this quick with so many respoonses. Makes me want to use only this
code.
Chris
Chris-
Look through your sites directories for files with the file
extension *.rb. If your system is running rails you should have a
bunch of .rb files in there. Also look for .rhtml files as those are
the templates. Do a find or grep through the directory for those file
extensions and report back. But so far I don’t see anything remotely
related to ruby or rails in any of the links you posted.
Under the heading “Models, Views, Controllers, Oh My!” there’s a
breakdown of the directory structure. Actually, Amy’s site has some
good introductory articles… enjoy.
On Monday 09 January 2006 03:24 pm, Jeff W. wrote:
The system in the given directory is a Perl based store system called
Interchange.
Version 5.4 seems to be deployed into this directory.
Oh heaven help me. May Interchange never darken my door again. Has
anyone ever
looked at the Perl source for Interchange? Nastiest Perl I’ve ever seen.
SteveT
Steve L.
Author:
Universal Troubleshooting Process courseware
Troubleshooting Techniques of the Successful Technologist
Rapid Learning: Secret Weapon of the Successful Technologist
Webmaster
One thing you could do is take 5 minutes to build yourself a tiny
application,
and then explore the directory structures of that. Combined with seeing
the
directory structure of your full blown app, plus some of the
documentation
several people have suggested, you should be able to familiarize
yourself
pretty quickly. As I remember, here are the steps:
First, find a directory where you (normal user) have read/write/execute
rails hello
cd hello
ruby script/generate controller Greetings index page2
ruby script/server
If the server gripes about another server and terminates, use this
command:
ruby script/server -p 8818
The preceding assumes that it’s safe to use port 8818 on your computer.
Check
your services file. If you need to do that, make sure you substitute
this
port number for the 3000 in the following URL’s.
Now, with the server running, browse to http://localhost:3000, and
you’ll see
a little page telling you all about the rails environment. Then browse
to http://localhost:3000/greetings (remember the controller you generated
was
called Greetings) and see the newly generated app’s main page, and go to http://localhost:3000/page2 to see a second page (another View, in Rails
parlance).
Doing the preceding will be 5 minutes very well spent, and you can not
only
look around the newly created directory structure, but you can mess
around
with it, because it’s a throwaway app it took you 5 minutes to create.
HTH
SteveT
Steve L.
Author:
Universal Troubleshooting Process courseware
Troubleshooting Techniques of the Successful Technologist
Rapid Learning: Secret Weapon of the Successful Technologist
Webmaster
At a guess I’d say this is a PHP system and is using Smarty
(http://smarty.php.net) as that defaults to having a compiled template
directory named templates_c.
Make sure it’s writable by whatever user PHP/Apache is running as.
Not much more we can suggest, as has already been pointed out this has
nothing to do with Ruby or Rails.
Thank you all for your help! It lead me to find the folder containing
the real deal. So I am having a hard time using this system and I am
just wondering where the database would be. I have replaced the folder I
listed in a prior post and put the entire rails directory in it’s place.
This folder was called rails. http://www.weracehardcore.com/store
I want to know about Ruby and How to link with Mysql dB.
www.ruby-lang.org and about the db access there is not much you need to
do
other than putting your databse name and credentials.
In any case no one can be of much help if you dont say what is it that
you
exactly want to do with ruby and rails.
I am an Initial Developer, I dont have Experience in Real time project
Thank you all for your help! It lead me to find the folder containing
the real deal. So I am having a hard time using this system and I am
just wondering where the database would be. I have replaced the folder I
listed in a prior post and put the entire rails directory in it’s place.
This folder was called rails. http://www.weracehardcore.com/store
If you’ve still got the original rails code (and if you haven’t seen
this already), check for the database.yml file in the config/ folder.
That’s got the database connection information in it. Usually there
will be 3 databases specified. Also, if whoever was developing was
using all the tools at their disposal, there should be a
development.schema SQL file under the db/ folder, and some Ruby code to
define how to build the database under db/migrate. Those might not
exist, though.
–
Alex
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.