# 1 Page website :)

**URL:** <https://www.ruby-forum.com/t/1-page-website/157313>\
**Category:** Rails\
**Created:** [January 9, 2009, 10:33am UTC](https://www.ruby-forum.com/t/1-page-website/157313 "2009-01-09T10:33:42Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![typemismatch](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/b9bd4f/32.png) [@typemismatch](https://www.ruby-forum.com/u/typemismatch)\
**Post date:** [January 9, 2009, 10:33am UTC](https://www.ruby-forum.com/t/1-page-website/157313/1 "2009-01-09T10:33:42Z")

</div>

Is there a way to create what is basically a 1 page website, something  
that just does a redirect or a single submit form etc. It seems like  
an entire Rails site with controllers etc is too much.

Maybe something with a single .rb page … who knows 🙂 just learning  
Rails.

thanks  
-c

---

<div class="post-metadata">

**Author:** ![typemismatch](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/b9bd4f/32.png) [@typemismatch](https://www.ruby-forum.com/u/typemismatch)\
**Post date:** [January 9, 2009, 10:48am UTC](https://www.ruby-forum.com/t/1-page-website/157313/2 "2009-01-09T10:48:57Z")

</div>

i don’t understand what you are looking for. could you be a little  
more specific.

if you just want a single page, why not build a single html-page?

---

<div class="post-metadata">

**Author:** ![typemismatch](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/b9bd4f/32.png) [@typemismatch](https://www.ruby-forum.com/u/typemismatch)\
**Post date:** [January 9, 2009, 11:14am UTC](https://www.ruby-forum.com/t/1-page-website/157313/3 "2009-01-09T11:14:14Z")

</div>

Rails is not good for 1-site-websites. The framework is “too big” for  
that, rendering takes more time than a plain html-file. You would need  
to have more than one site to have brenefits from rails like layout,  
DRY etc. But if you still want to learn rails by one-site-websites,  
checkout [http://www.buildingwebapps.com/learningrails](http://www.buildingwebapps.com/learningrails) It’s for free.  
The first one or two screencast deal with that.

Greetings & have fun

Chris

---

<div class="post-metadata">

**Author:** ![typemismatch](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/b9bd4f/32.png) [@typemismatch](https://www.ruby-forum.com/u/typemismatch)\
**Post date:** [January 9, 2009, 3:07pm UTC](https://www.ruby-forum.com/t/1-page-website/157313/4 "2009-01-09T15:07:57Z")

</div>

If you don’t want to use Active Record (database), just configure  
environment.rb to exclude it. Generate (scaffold) 1 controller and  
fill in the actions / views as you like.

Cheers, SAzima

---

<div class="post-metadata">

**Author:** ![typemismatch](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/b9bd4f/32.png) [@typemismatch](https://www.ruby-forum.com/u/typemismatch)\
**Post date:** [January 9, 2009, 5:25pm UTC](https://www.ruby-forum.com/t/1-page-website/157313/5 "2009-01-09T17:25:46Z")

</div>

On Jan 8, 9:04 pm, typemismatch [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> Is there a way to create what is basically a 1 page website, something  
> that just does a redirect or a single submit form etc. It seems like  
> an entire Rails site with controllers etc is too much.
> 
> Maybe something with a single .rb page … who knows 🙂 just learning  
> Rails.
> 
> thanks  
> -c

What you ask is definitely possible, but I would ask what you are  
exactly trying to do.

---

<div class="post-metadata">

**Author:** ![typemismatch](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/b9bd4f/32.png) [@typemismatch](https://www.ruby-forum.com/u/typemismatch)\
**Post date:** [January 9, 2009, 6:35pm UTC](https://www.ruby-forum.com/t/1-page-website/157313/6 "2009-01-09T18:35:28Z")

</div>

Just as if I would not use a framing hammer to pound in a 4 penny finish  
nail, I wouldn’t use Rails for a 1 page website…

Maybe php is what you’re looking for?

---

<div class="post-metadata">

**Author:** ![typemismatch](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/b9bd4f/32.png) [@typemismatch](https://www.ruby-forum.com/u/typemismatch)\
**Post date:** [January 9, 2009, 7:09pm UTC](https://www.ruby-forum.com/t/1-page-website/157313/7 "2009-01-09T19:09:22Z")

</div>

Redirect? How about just apache?

index.html is a start…

---

<div class="post-metadata">

**Author:** ![typemismatch](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/b9bd4f/32.png) [@typemismatch](https://www.ruby-forum.com/u/typemismatch)\
**Post date:** [January 9, 2009, 5:37pm UTC](https://www.ruby-forum.com/t/1-page-website/157313/8 "2009-01-09T17:37:07Z")

</div>

I find that Sinatra is great for small web apps like simple  
database-backed  
forms or form mailers, or simple web services.

> **[GitHub - bmizerany/sinatra at master](https://github.com/bmizerany/sinatra/tree/master)**
>
> master

doppler
