cageface:
Oh, I get it now, this awesome trick works, but you have to set you app up
EXACTLY, like it is said...I don't get those 'features'
but thanks.

Jan



2010/7/24 Jan Kadera <[email protected]>

> To Frederick:
>
> "What do you mean by  'there are no relative paths in rails' ?"
> As I understand the difference, there is some point in the computer
> directory tree, where is said I'm working, for example
> /home/myusername/RubyApps/rails/default
> now if I want to link something inside of that directory, you just type
> name of the file, because some kind of magic or more than human power will
> know it should first look there.
> On the other hand the absolute path is recognized by starting with the only
> root of the whole computer filesystem, like "/" or "C:\"
>
> ...so if I have to use "/" in the pseudo-relative path like this, then I
> guess I'm using absolute path from the relative point described above, which
> I absolutely don't get.
> And if it really is either of those, I can't imagine usage of the other
> one.
>
>
>
> To cageface:
> Sir, I may be an idiot, but it doesn't work.
> I have pictures in public/pic
> the picture filename is darkKnight_wide.jpg
> and I'm reffering to it like this:
> <body background=<%= image_tag "darkKnight_wide.jpg" %>>
> and I know nothing abou html, but there is no way that the 'higher power'
> translating that ruby babbling into html can know which subdirectory in the
> public directory it should try.
>
>
>
> To everyone:
> I'm trying to follow this tutorial to create a password checker in my app:
>
> http://www.devarticles.com/c/a/Ruby-on-Rails/Login-Systems-and-More-with-Ruby-on-Rails/
> I followed until like two thirds of article and crashed on this one:
> "Create an entry in the users table, start the server, and you'll find
> that you can log in from *http://localhost:3000/user/login*, and view your
> account information from *http:// localhost:3000/user/my_account*. "
> a created a login name and password in the correct database table, but,
> when I type in to my browser myIP:3000/user/login it's giving an error
> message saying that it cant apply something on [].
> I almost completely don't know what exactly am I doing, but I looked into
> the database and found the password there...the exact password, which is I
> would say lame, isn't it? There should be hash or something (not ruby-hash,
> but you probably know).
> Because of that I'd say that this tutorial is kind of crapy and I wanted to
> ask anyone if you know about any better, I'd love to read it.
>
> Regards
> Jan
>
>
>
> 2010/7/24 cageface <[email protected]>
>
> On Jul 24, 1:06 am, Jan Kadera <[email protected]> wrote:
>> > Well, I figured this one out now also...apparently there is huge
>> difference
>> > between those two strings:
>> > /pic/picture.jpg
>> > pic/picture.jpg
>> > Which I guess means there are no relatives paths in rails, right?
>>
>> It's better to use the image_tag helper than code full paths to images
>> in your app. The convention is like this:
>>
>> 1. create an images subdirectory under public in your rails app
>> 2. link to an image via the image_tag helper
>>
>> So in your case you'd create public/images/picture.jpg and link to it
>> in a template like <%= image_tag "picture.jpg" %>.
>>
>> --
>> miles
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Ruby on Rails: Talk" group.
>> To post to this group, send email to [email protected].
>> To unsubscribe from this group, send email to
>> [email protected]<rubyonrails-talk%[email protected]>
>> .
>> For more options, visit this group at
>> http://groups.google.com/group/rubyonrails-talk?hl=en.
>>
>>
>

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to