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
2
votes
1 answer

What's Ramaze's equivalent to Sinatra's Sinatra::NotFound?

In other words, how do I throw a "404 - not found" in Ramaze?
Sunder
  • 1,445
  • 2
  • 12
  • 22
2
votes
2 answers

Why won't Sequel write my database table?

controller/makenew.rb class MakeController < Controller map '/makenew' #require 'model/debate' def debate if request.post? #this line is potentially dangerous! #---> 1/3 fetch postdata data = request.subset(:question, :type,…
desbest
  • 4,746
  • 11
  • 51
  • 84
2
votes
1 answer

Thin Crashes Hard with Ramaze

So, I'm just trying out Ramaze for a new project, and I'm wondering why it won't work with Thin, but will with ramaze start (which is webrick I guess). Here's what it gives…
Phil Kulak
  • 6,960
  • 8
  • 45
  • 50
2
votes
1 answer

How do I get access to PUT data with the ramaze framework?

I'm attempting to use Ramaze, the ruby framework, to implement a RESTful controller. I can't seem to gain access to the data in the request when I send a PUT, however. Sample code: require 'ramaze' class PutController < Ramaze::Controller map…
Daniel Papasian
  • 16,145
  • 6
  • 29
  • 32
1
vote
0 answers

Mount grape framework in ramaze framework?

Someone help me to mount grape framework... require 'grape' class Api < Grape::API format :json resources :articles do get do {hello: 'hello world!'} end end end Also i wanna to change custom…
aaaa
  • 73
  • 1
  • 6
1
vote
0 answers

Set cookie with ramaze framework?

Before request.cookies[:user_id] = 1 After:(get cookie) request.cookies[:user_id] return nil
aaaa
  • 73
  • 1
  • 6
1
vote
1 answer

Ramaze Request Parameters in Unicode?

I've got a partial for rendering a form that is throwing an error using unicode; I've narrowed the error down to the line; If I go to localhost/thepath?q=中文 it throws Encoding::CompatibilityError…
Loyal Tingley
  • 910
  • 1
  • 8
  • 20
1
vote
0 answers

Why am I getting ArgumentError: invalid %-encoding?

This code fetches the content in plain text or html, and displays it on the page. A HTML form with the fields post_id content POSTS to edit_post in my controller. I'm using Sequel ORM and Ramaze. def edit_post Encoding.default_external = 'utf-8' …
desbest
  • 4,746
  • 11
  • 51
  • 84
1
vote
1 answer

Get current controller and action name in Ramaze

Is there a way to get the currently executing controller and action name in Ramaze? require 'ramaze' class FooController < Ramaze::Controller def bar "#{controller}.#{action}" #how to get this to work? end end PS: I know self.class.name…
Sunder
  • 1,445
  • 2
  • 12
  • 22
1
vote
1 answer

How to install and run Ramazes Rapaste easiest?

I'm pretty familiar with Ruby and Ramaze, but I wanted to provide my Admins with an install howto, since they're more familiar with Tomcat and standard Apache installations. I tried it locally first and it got pretty long: sudo aptitude install…
Fabian Buch
  • 831
  • 2
  • 9
  • 18
1
vote
0 answers

Ramaze doesn't expose mixins

Is there a particular reason why Ramaze doesn't expose the inherited index method/action here? require 'ramaze' module Foo def index "Index page" end end class MainController < Ramaze::Controller include…
Sunder
  • 1,445
  • 2
  • 12
  • 22
1
vote
1 answer

Does Ramaze have a Sinatra like "before/after" hooks?

Wondering if Ramaze has hooks like Sinatra. Does anyone know? Thanks!
Sunder
  • 1,445
  • 2
  • 12
  • 22
1
vote
0 answers

Are there any ramaze and eventmachine examples working together?

How does one use ramaze with eventmachine? i can't find any examples of a ramaze-enabled EM. For example something similar to async sinatra? thanks
gurpal2000
  • 1,004
  • 1
  • 17
  • 35
1
vote
1 answer

Cannot find ramaze that is installed with gems

I have Ramaze version 2012.04.14, Rubygems 1.3.6 and Ruby 1.8.6 so I have the latest version. My console recognises Ramaze and all associated commands. (I can run ramaze --version) I have made a folder inside my www/ folder inside my localhost…
desbest
  • 4,746
  • 11
  • 51
  • 84
1
vote
2 answers

Ramaze with Sequel Migrations?

I'm trying to get migrations set up in Ramaze. I'm coming from doing mostly Rails stuff, but I wanted to give something else a shot. Anyway, I've got a directory in my project called "migrations" with a start.rb file and then my migrations. Here's…
Phil Kulak
  • 6,960
  • 8
  • 45
  • 50