Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7576187
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T16:51:40+00:00 2026-05-30T16:51:40+00:00

I discovered Sinatra not long ago and started to translate a webform I made

  • 0

I discovered Sinatra not long ago and started to translate a webform I made in html/php/css into sinatra language.

At this point, everything seems to be working great except for one thing : a span tag.

When I run my sinatra, I get the following error :

/aaa/bbb/…/views/index.haml in nil
%span.small Add your name

I have no idea why it is not working since everything in the code is working super well!

Here is a part of my CSS file (note that I removed some of the code so there won’t be a ton of it. The %h1, %p, etc, are working well!) :

body{
font-family:"Lucida Grande", "Lucida Sans Unicode", Verdana, Arial, Helvetica, sans-serif;
font-size:12px;
/*text-align:center;*/
}

p, h1, form, button{border:0; margin:0; padding:0;}
.spacer{clear:both; height:1px;}

.myform{
margin:0 auto;
width:400px;
padding:14px;
}

#stylized{
border:solid 2px #b7ddf2;
background:#ebf4fb;
}

#stylized .small{
color:#666666;
display:block;
font-size:11px;
font-weight:normal;
text-align:right;
width:145px;
}

Here is the haml code

%html
  %head
    %title Website Test
    %link(rel="stylesheet" href="css/styles.css")
  %body
    #stylized.myform
      %form{ :id => "form", :name => "form", :method => "post", :action => "form1.rb"}
        %h1 Virtual Machine Form
        %p Please fill every field and then hit the submit button

        %label Name
          %span.small Add your name
        %input{ :type => "text", :name => "name", :id => "name"}

And here is the html code that is working

<div id="stylized" class="myform">
  <form id="form" name="form" method="post" action="vmform_process.php">
    <h1>Virtual Machine Form</h1>
    <p>Please fill every fields and the hit the submit button</p>

    <label>Name
      <span class="small">Add your name</span>
    </label>
    <input type="text" name="name" id="name" />
  ...
  </form>
</div>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T16:51:42+00:00Added an answer on May 30, 2026 at 4:51 pm

    You should probably include the actual error. I think your problem is that the label includes inline and nest content. It should be

    %label
      Name
      %span.small Add your name
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've recently started working on my first Sinatra/CouchDB app and kept running into a
I discovered this: http://developer.apple.com/iphone/library/qa/qa2010/qa1686.html Since this was incredible useful for me and never found
Discovered something and am looking into a bit of incite as to why one
I discovered template metaprogramming more than 5 years ago and got a huge kick
We recently discovered that the Google Maps API does not play nicely with SSL.
I discovered NHaml some days ago and it's a great project. When I try
I have just discovered the command :sort n in vim (how did I not
I discovered this by chance when I have a duplicate key/value pairs in my
This morning I discovered some strange behavior of the SmtpClient class (.net 3.5). Can't
I discovered this pattern (or anti-pattern) and I am very happy with it. I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.