DummyText Gem

DummyText Gem

I often need dummy text while developing websites and working on projects. I decided to write a little gem which can generate dummy lorem ipsum texts. I know that there are already a few outside, but I thought it would be a good practise to write it on my own.

You can easy generate dummy lorem ipsum texts and it is possible to generate your own text template and override the default template.


You can find the gem here


Just install it:

gem install dummy_text

or add it to your Gemfile:

gem "dummy_text"

It is possible to generate following output with a view helper:


# 1 character will be created:

<%= dummy_text "1c" %>

# 2 words will be created:

<%= dummy_text "2w" %>

# 3 sentences will be created:

<%= dummy_text "3s" %>

# 4 paragraps will be created:

<%= dummy_text "4p" %>


To generate your own template:

<%= rails g dummy_text %>


This will create a text_template.txt file under "config/dummy_text/text_template.txt". Now you can change your dummy text.

Matthias Frick
Ruby on Rails
2 Kommentare

Über den Autor

Matthias Frick
Matthias Frick, MSc.

Er ist ein langjähriger Ruby-on-Rails Entwickler und leitet das Unternehmen Frick-Web.

2 Kommentare zu "DummyText Gem"

  1. Rickman
    Rickman 07.09.2011
    Thought I should give it a shot, I was right. Very nice gem!
  2. Kai Behncke
    Kai Behncke 12.09.2011
    I appreciate free, succinct, reliable data like this. Thanks a lot!

Kommentar verfassen