Tool Database

Hello everybody back again and still very confused, I need to know if
its possible to make a tool database? where each tool is identified in
the system as a alphabet and numerical number (such as WNCH78935 brings
up Wrench) and also for employees to be called up by a number only (such
as 56896 is John D…

I’ll probably have other questions as well for this same thing but if
someone can answer me oin this i would really appreciate it, also will
rails run without internet? thank you for the help!

On Mar 14, 2013 12:41 AM, “Andrew l.” [email protected] wrote:


Posted via http://www.ruby-forum.com/.

This doesn’t seem so much a Ruby question as a rails question (lots of
overlap, tho). Have you gone completely through a rails tutorial?

In purely database terms, what you are asking is pretty trivial, in fact
extremely common.

@Garth
Thank you garth so hash’s will be my friend then okay then. can
you show me how to make a proper working hash? i would appreciate it.

@tamouse mailing lists (Guest)
Thanks ill put the question in rails too then. I have been thru a
tutorial but i have hard time learning thru those, i learn best by
takeing a working code and playing with it and such.

also can you even make a program that can run on windows with ruby? like
i want to use ruby to make something that looks like this. (see picture)

Hi Andrew,

On 14/03/13 16:09, Andrew l. wrote:

Hello everybody back again and still very confused, I need to know if
its possible to make a tool database? where each tool is identified in
the system as a alphabet and numerical number (such as WNCH78935 brings
up Wrench) and also for employees to be called up by a number only (such
as 56896 is John D…

I’ll probably have other questions as well for this same thing but if
someone can answer me oin this i would really appreciate it, also will
rails run without internet? thank you for the help!

If you’re going for something simple, it sounds like something a Hash
would help with. You store the information you want in a Hash (one per
“database”), and retrieve it by the ID/number. Your initial
experimentation in this area will probably be best spent playing with
Hashes. :slight_smile:

Can’t help much with Rails myself, I don’t use it. :} I’m guessing
probably yes if you’ve got your own webserver set up, much like ordinary
webdev.

Cheers,
Garth

Hi Andrew,

Once you’re up and running (either in Rails or pure Ruby) and are far
enough along that you’re writing small scripts, you’ll possibly want to
dig into Hash more:

At some point in your code, you’d have something like:

@tools = {}
Some loop

(Read in info)

@tools[toolID] = SomeClass.new id, name, employeeID, location
end

And for lookup:

tool = @tools[toolID]

You’d also need to handle saving, loading, etc.

However, looking at your mockup image, if you’re after a GUI as well,
you might actually be better off going down the Rails path first. This
will handle the GUI aspect (if you’re fine with a web app), as well as
using a proper database (you won’t need to worry about writing your own
load/save, but you’ll need to set up a database). You could still do
this in pure Ruby of course, but it would probably take far longer,
especially if you were just starting out.

Also, re Windows, yes, Ruby runs on Windows, and if you used Rails, you
could always use a browser on Windows to access the finished product.
You’d have to ask a Rails guru how well it runs directly under Windows-
I don’t know- but there seems to be a Windows download at least.

Unfortunately, I can’t help much on the Rails front personally.

It looks like you have a big task in front of you. I wish you luck.

I hope this helps.

Cheers,
Garth

Rails runs fine without internet connectivity.

@Garth
Thank you garth i really appreciate you help and yes i know its a
big task but its the only way i learn lol. but thank you for the hash
and website ill take a look at it. ill ask on the rails forum if it can
run in windows without the online capability

Okay so i could never figure out how to get rails to work :confused: so i
decided to go with a gui tool kit. The one i have decided to use is
Shoes so can someone point me in the right direction for where i should
look for information next?

On Fri, Mar 15, 2013 at 12:46 AM, Andrew l. [email protected]
wrote:

@Garth
Thank you garth i really appreciate you help and yes i know its a
big task but its the only way i learn lol. but thank you for the hash
and website ill take a look at it. ill ask on the rails forum if it can
run in windows without the online capability


Posted via http://www.ruby-forum.com/.

This might be a good place to start, if you haven’t already:

http://rubyinstaller.org/

and

Redirecting to Google Groups

and this article seems popular:

Limitations in running Ruby/Rails on windows - Stack Overflow

On Sun, Mar 17, 2013 at 12:34 AM, Andrew l. [email protected]
wrote:

Okay so i could never figure out how to get rails to work :confused: so i
decided to go with a gui tool kit. The one i have decided to use is
Shoes so can someone point me in the right direction for where i should
look for information next?

What do you want to know?