Questions tagged [ramaze]

Ramaze is a simple, light and modular open-source web application framework written in Ruby.

Ramaze is a web application framework created by Michael Fellinger (also known as manveru) for Ruby. The philosophy of it could be expressed in a mix of KISS and POLS, trying to make simple things simple and complex things possible. This of course is nothing new to anyone who knows some Ruby, but is often forgotten in a chase for new functionality and features. Ramaze only tries to give you the ultimate tools, but you have to use them yourself to achieve perfect custom-tailored results.

Another one of the goals during development of Ramaze was to make every part as modular and therefore reusable as possible, not only to provide a basic understanding after the first glance, but also to make it as simple as possible to reuse parts of the code.

The original purpose of Ramaze was to act as a kind of framework to build web-frameworks, this was made obsolete by the introduction of rack, which provides this feature at a better level without trying to enforce any structural layout of the resulting framework.

Basic Example

require 'ramaze'

class MainController < Ramaze::Controller
  def index
    "Hello, Ramaze!"
  end
end

Ramaze.start

Installation

Installing Ramaze is super easy when using Rubygems:

$ gem install ramaze

Once the gem is installed you can create a new application using the "ramaze" binary:

$ ramaze create myapp

Links

52 questions
1
vote
1 answer

How do I conditionally disable Ramaze layout?

I'd like a controller method to respond by disabling/denying layout if the request happens to be an ajax request (i.e., request.xhr? == true). The following doesn't seem to work -- it returns the layout nonetheless class FooController <…
Sunder
  • 1,445
  • 2
  • 12
  • 22
1
vote
2 answers

Delegating to another action in Ramaze

I'd like to delegate to the Show action from the Index action if an id was passed. I can't seem to get it to work, what am I doing wrong here? require 'ramaze' require 'slim' class UsersController < Ramaze::Controller engine :slim def…
Sunder
  • 1,445
  • 2
  • 12
  • 22
0
votes
2 answers

Links in Ramaze with a/r helpers

In ramaze (2009.06.04) the link helper has changed and I have some problems to use it. I want to create a link to the MainController -> test action #{a('Testlink', r(:test))} This works if the URL is not in a specific controller. If the user is in…
f00860
  • 3,486
  • 7
  • 41
  • 59
0
votes
1 answer

ActiveSupport::Inflector in a Ramaze project?

I just upgraded to ActiveSupport 3 and lost all my string methods like "camelize", "titleize", and the like. It broke things all over my project, and so far I've fixed them by re-writing those methods myself, but there has to be a better way. I do…
Phil Kulak
  • 6,960
  • 8
  • 45
  • 50
0
votes
1 answer

Intermediate Ramaze Routing Help Please

Part 1: I have a call to layout(:default){|path,wish| wish !~ /rss|atom|json/} but requests to /foo/bar.json seem to think wish is html and uses the layout anyway. How can I fix this? Part 2: I want to route /path/to/file.ext so that it calls the…
Loyal Tingley
  • 910
  • 1
  • 8
  • 20
0
votes
1 answer

Why isn't Openshift installing the pg gem that's in my gemfile?

My gemfile for my Ramaze (rack) app looks like this. source 'http://rubygems.org' ruby '1.9.3' gem 'ramaze', "<= 2012.04.14" #old version gem "innate", ">= 2012.03", "< 2012.11" #old version gem 'rack', "<= 1.4.1" gem 'sequel' #if defined?…
desbest
  • 4,746
  • 11
  • 51
  • 84
0
votes
0 answers

Why does my rack app occasionally load weird without the layout after I save a file in it?

I'm using the Ramaze framework for my rack app, and whenever I save a file in my app on my computer or use git push to give the server the newest files, for Heroku and refresh the page, I'm greeted with the page without the layout file. Strangely it…
desbest
  • 4,746
  • 11
  • 51
  • 84
0
votes
1 answer

Windows 8 says database.db doesn't exist, but my ramaze app says it does 8 (works on Windows 7)

I think the images explain enough. This is a very weird bug. It works on my Windows 7 laptop but not my Windows 8 one. Windows says that database.db doesn't exist but my ramaze app thinks it does. The app writes to the database, but I cannot view…
desbest
  • 4,746
  • 11
  • 51
  • 84
0
votes
1 answer

running the ramaze blog example - an error message

deltrem@deltrem-desktop:~/ramaze web/app/blog$ ruby start.rb I [2010-06-10 14:53:33 $1886] INFO | : activating sequel I [2010-06-10 14:53:33 $1886] INFO | : Installing sequel /usr/local/lib/site_ruby/1.8/rubygems/remote_fetcher.rb:124:in…
Delirium tremens
  • 4,623
  • 9
  • 46
  • 59
0
votes
1 answer

Render a template in Ramaze

I've got a template for a partial that I'd like to use and I'm wondering if it's possible to just render the thing without needing to send a mock request to a controller. I'm never going to need to render this to an AJAX call, so it seems silly to…
Phil Kulak
  • 6,960
  • 8
  • 45
  • 50
0
votes
1 answer

Most "ruby-like" way of combining two controllers in Ramaze

How can I split up my codebase in Ramaze into different controller classes, and what is the most "ruby-like" way of doing so? I have a basic project in Ramaze that I want to split into multiple files. Right now, I am using one controller class for…
David
  • 2,080
  • 5
  • 29
  • 44
0
votes
2 answers

console User.where("username LIKE ?", "%Test%")

Im trying to figure out the right way to do this. The idea is to learn/understand how to do searches with partial information. Like if I'm searching 500 usernames for all that have "Test" as part of the username. (examples "Test Same", "Ron Test",…
jtlindsey
  • 4,346
  • 4
  • 45
  • 73
0
votes
1 answer

Can't find out where my Ruby 1.9 string encoding is getting messed up

Somewhere along the line from the DB to the application, this: sauté is getting turned into this: sauté I'm using Ramaze + Rack + MySQL. I've got a force_encoding plugin set up, so the encoding on the string is UTF-8. If I view the record in the…
Phil Kulak
  • 6,960
  • 8
  • 45
  • 50
0
votes
1 answer

Using content_for and yield_content in Ramaze

Sinatra has sinatra/contrib to asist with this, what's the equivalent in Ramaze? I'm using Erubis by the way. Also, a quick Google search shows up really old pages that insist setting variables in the controllers and using them in the views. Edit…
Sunder
  • 1,445
  • 2
  • 12
  • 22
0
votes
1 answer

Ramaze app won't load due to Rack version conflicts

When I run ramaze start I get this. C:/mowes/ruby/lib/ruby/site_ruby/1.9.1/rubygems/specification.rb:1990:in `raise_ if_conflicts': Unable to activate innate-2012.03, because rack-1.5.2 conflicts w ith rack (~> 1.4.1) (Gem::LoadError) Here's my…
desbest
  • 4,746
  • 11
  • 51
  • 84