Hi Everyone,

I was going through the Rails tutorial from here:

http://ruby.railstutorial.org/chapters/filling-in-the-layout#top

I was getting this exception on my WebRick server:

Started GET "/assets/blueprint/print.css" for 127.0.0.1 at 2011-11-28
14:43:00 +0530
Served asset /blueprint/print.css - 404 Not Found (0ms)

ActionController::RoutingError (No route matches [GET]
"/assets/blueprint/print.css"):

Now i would like to know that when the server is looking under the
assets folder then does it mean that it is the assets folder inside app?
Or do i have to place the assets folder under root application
directory?

The guide says to put it under the /public folder. I am a but confused.
The images, css nothing is being picked up by the browser.

I am on WinXP with Rails 3.1.3.

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

--
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 rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

Search Discussions

  • Norbert Melzer at Nov 28, 2011 at 9:31 am

    Am 28.11.2011 10:18, schrieb Somnath Mallick:

    Now i would like to know that when the server is looking under the
    assets folder then does it mean that it is the assets folder inside app?
    Or do i have to place the assets folder under root application
    directory?
    One way it would be to put the blueprint-stuff under
    <rails_root>/public/assets/blueprint/* but this will only work if you
    use the static files of blueprint. If you use it with another framework
    above it like compass, it seems that you have to wait until that is
    ported to the rails asset pipeline.

    Also that tutorial is for rails 3.0, which not has the asset-pipeline.
    So with all assets related stuff you will stumble upon some problems.

    Just start again and use the rails version of that tutorial (3.0.11)

    HTH
    Norbert
  • Somnath Mallick at Nov 28, 2011 at 9:38 am
    The tutorial states to put images into the public/images folder

    and

    custom made stylesheets into public/stylesheets/ and blueprint stuff
    into public/stylesheets/blueprint

    But it doesn't work for me.

    I would give your path a try and let you know. But from what you are
    saying that there maybe nothing wrong with what i have done, its just
    that some features are yet to added into 3.1.3?

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

    --
    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 rubyonrails-talk@googlegroups.com.
    To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
    For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
  • Somnath Mallick at Nov 28, 2011 at 9:41 am
    Thanks, your path worked. But seems a bit strange. That the paths
    mentioned in the tutorial and the actual path would vary so much, just
    because i am just a few versions up the ladder.

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

    --
    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 rubyonrails-talk@googlegroups.com.
    To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
    For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
  • Colin Law at Nov 28, 2011 at 9:43 am

    On 28 November 2011 09:41, Somnath Mallick wrote:
    Thanks, your path worked. But seems a bit strange. That the paths
    mentioned in the tutorial and the actual path would vary so much, just
    because i am just a few versions up the ladder.
    Have a look at the last chapter of the tutorial, it explains how it
    works on 3.1. Though as Somnath suggested it may be easier to work
    through the tutorial using the earlier rails version, then move to 3.1

    Colin

    --
    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 rubyonrails-talk@googlegroups.com.
    To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
    For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
  • Norbert Melzer at Nov 28, 2011 at 11:01 am

    Am 28.11.2011 10:41, schrieb Somnath Mallick:
    Thanks, your path worked. But seems a bit strange. That the paths
    mentioned in the tutorial and the actual path would vary so much, just
    because i am just a few versions up the ladder.
    With the introduction of the asset-pipeline the behaviour of
    stylesheet_link_tag changed. This is what makes it incompatible, same is
    for the corresponding javascript and image helpers.

    In 3.0 and before, the helpers were wired to /public/stylesheets (or
    images, javascripts) and you had to place a copy of your css there.

    Now with 3.1 and the introduction of the assetpipeline there were changes.

    All helpers now create a reference to "/assets/<filename>". You can
    either put static assets there, or the recommended way, put your assets
    in the corresponding folder under /app/assets/.

    The big advantage of this way is, that you can have stylesheets or
    javascript in a template or alternative language like less, sass or scss
    for styles or coffeescript for javascript.

    Theoretically you could even drop your stylesheets in brainfuck[1] if
    someone provides a gem that processes the brainfuck document.

    The disadvantage on the other hand: People following 3.0 tutorials on a
    3.1 environment, asking themself "Why doesnt that work? I using rails
    3!" But not realizing the change in the minor version number, since in
    many heads a change in minor still means "compatibility"

    I hope this short excurse is helping you to get over your problems.

    Bye
    Norbert

    PS: Please use quoting in the future and quote the parts of the message
    you are refering to, this would make following the conversation easier.

    [1]: http://en.wikipedia.org/wiki/Brainfuck
  • Somnath Mallick at Nov 28, 2011 at 10:27 am
    Ok... I will go step by step. And reach the last chapter. But thanks for
    the help.

    Not finding myself at home with Ruby/Rails at all! :(

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

    --
    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 rubyonrails-talk@googlegroups.com.
    To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
    For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
  • Mukesh Singh at Nov 28, 2011 at 10:34 am
    http://railscasts.com/episodes/279-understanding-the-asset-pipeline
    On Mon, Nov 28, 2011 at 3:56 PM, Somnath Mallick wrote:

    Ok... I will go step by step. And reach the last chapter. But thanks for
    the help.

    Not finding myself at home with Ruby/Rails at all! :(

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

    --
    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 rubyonrails-talk@googlegroups.com.
    To unsubscribe from this group, send email to
    rubyonrails-talk+unsubscribe@googlegroups.com.
    For more options, visit this group at
    http://groups.google.com/group/rubyonrails-talk?hl=en.

    --
    Regards
    Mukesh Paras Singh

    --
    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 rubyonrails-talk@googlegroups.com.
    To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
    For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
  • Dheeraj Kumar at Nov 28, 2011 at 10:35 am
    You could start with 3.0 and move up to 3.1, as 3.1 introduced several major changes.


    Dheeraj Kumar

    On Monday 28 November 2011 at 3:56 PM, Somnath Mallick wrote:

    Ok... I will go step by step. And reach the last chapter. But thanks for
    the help.

    Not finding myself at home with Ruby/Rails at all! :(

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

    --
    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 rubyonrails-talk@googlegroups.com (mailto:rubyonrails-talk@googlegroups.com).
    To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com (mailto:rubyonrails-talk+unsubscribe@googlegroups.com).
    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 rubyonrails-talk@googlegroups.com.
    To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
    For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
  • Nverba at Nov 28, 2011 at 1:24 pm
    I would go back and work through from the beginning, installing the version
    of Ruby the tutorial advises using RVM. This will make it MUCH easier to
    learn.

    OR

    If you feel confident, and are up to the challenge, you could skip forward
    to the last chapter, get an understanding for the differences and changes
    you need to make in order to get the application working in 3.1. Then work
    through it from the start, making changes for 3.1 as you go. BUT, this
    would potentially be very confusing and frustrating for someone just
    learning frameworks and programming for the first time.

    I chose the first option. I found this gave me a greater understanding of
    Rails, as I now understand how 3.0 worked, but have since moved on to
    working with 3.1
    As covered in another comment, don't be fooled in the small version number.
    They made some very significant changes to 3.1 that change the way you work
    with Rails completely.

    Good luck, followed from the start, this is a excellent tutorial.

    --
    You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
    To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/gbSmErcsyqkJ.
    To post to this group, send email to rubyonrails-talk@googlegroups.com.
    To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
    For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouprubyonrails-talk @
categoriesrubyonrails
postedNov 28, '11 at 9:18a
activeNov 28, '11 at 1:24p
posts10
users6
websiterubyonrails.org
irc#RubyOnRails

People

Translate

site design / logo © 2022 Grokbase