no such file to load -- ramaze (LoadError)

Problem symptom:

start.rb:1:in `require': no such file to load -- ramaze (LoadError) from start.rb:1

Solutions (choose one):

  1. ruby -rrubygems start.rb
  2. export RUBYOPT=-rrubygems
  3. require 'rubygems' # before require 'ramaze'

Why aren't my template files being used?

Make sure your template files have the right extension for the template engine you are using.

  • .rhtml for Erubis
  • .haml for haml
  • .xhtml for Ezamar
  • etc.

Also make sure you're putting them in the directory that Ramaze is looking for templates. By default, this is the view/ subdirectory.

How do I handle file uploads?

See the file upload example in the examples directory.

How do I get Ramaze to serve static files?

By default, Ramaze will attempt to serve any files found in the public/ directory of your application (relative to the file with Ramaze.start in it). For example, if you have a file public/foo/bar.pdf, you can download it by browsing to http://mydomain.com/foo/bar.pdf. You can change the public path using

Global.public_root = 'some/new/path'

How do you pronounce Ramaze?

There are two ways Ramaze is usually pronounced. The one that is most common at the moment is like the English 'amaze' with a prefixed 'r'.

International Phonetic Alphabet transcription:

ɹʌˈmejz

The other way is using a Japanese-like pronunciation.

`ra` as in `rasta`
`ma` as in `mark`
`ze`, just make it sound German ;)

or, using International Phonetic Alphabet transcription:

ɹaˈmazɛ
ɾaˈmazɛ

or, using japanese Katakana:

ラマゼ

Where is the issue/bug tracker?

There is no official issue tracking software in place. A couple of probable reasons for this:

  1. Ramaze is well-spec'ed, so many problems are dealt with before they even make it into the repository.
  2. Any feature requests and actual bug reports just trickle into the mailing list or the IRC channel, and they are spec'ed and dealt with very quickly. Sometimes the discoverer of the problem just creates and submits a patch, and sends it in. Patches are usually accepted very quickly.

Nevertheless, if you feel that you must use an issue tracker in lieu of the mailing list and IRC channel, then submit a new ticket here.

How do I print to the log?

Ramaze::Log.debug "some debug message"
Ramaze::Log.warn "some warning message"
Ramaze::Log.info "some info message"

How do I enable DEV messages?

Ramaze::Log.loggers.each{|l| l.log_levels << :dev }

How do I turn off DEBUG and INFO messages?

  Ramaze::Log.ignored_tags = [:info, :debug]

More info on this mailing list thread. Or, to turn off all logging:

  Ramaze::Log.loggers = []

How do I save logs to file?

  unless Ramaze::Log.loggers.size == 2
    FileUtils.mkdir_p(__DIR__/:logs)
    Ramaze::Log.loggers << Ramaze::Informer.new(__DIR__/:logs/"ramaze_#{Time.now.strftime('%Y%m%d%H%M%S')}.log")
  end

How do I set an HTTP header?

  Ramaze::Dispatcher::Action::FILTER << proc {|response|
    response.header['Cache-Control'] = 'no-store'
  }

How do I set Ramaze options?

Ramaze options can be set via the ramaze command line binary

  ramaze start.rb -a adapter

via Ramaze.start

  Ramaze.start :adapter => adapter

via the Global namespace

  Ramaze::Global.adapter = adapter

or a Global.setup block

  Ramaze::Global.setup do |g|
    g.adapter = adapter
  end
 
Back to top
faq.txt · Last modified: 2008/05/11 04:49 by tmm1