Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9043865
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T10:50:17+00:00 2026-06-16T10:50:17+00:00

I am not a rails developer. I am a systems engineer trying to create

  • 0

I am not a rails developer. I am a systems engineer trying to create a simple redmine plugin that shows the contents of a backup folder. Basically the output of Dir.glob(“/path/to/folder”). I could achieve this in the irb console.

I followed the official redmine plugin tutorial. I dont need any model because i dont want to store any database. This is just a view to show the contents form the filesystem. I created a controller which automatically generated the view. I am getting a Nameerror. Pasting the code i have made for the relevant files. Please help me with making a redmine plugin that just outputs the contents of a folder to the browser. Also how do I execute certain system calls and show the outputs in the plugin?

plugin name: redmine_backups

controller: backups_controller.rb
I havent touched this file at all.

app/views/backups/index.html.erb

<h2>Backups#index</h2>

<table>
<ul>
<% @files = Dir.glob("/tmp/*") %>
<% @files.each do |f| %>
<%= f %>
<% end %>
</ul>
</table>

redmin_backups/init.rb

require 'redmine'

Redmine::Plugin.register :redmine_backups do
name 'Redmine Database Backups plugin'
author 'Author'
description 'This is a plugin for displaying database backups within Redmine'
version '0.0.1'
url 'http://example.com/path/to/plugin'
author_url 'http://example.com/about'

menu :application_menu, :backups, { controller => 'backups', :action => :index }, :caption => 'Backups', :last => 'true'
end

The error I get is
undefined local variable or method 'controller' for #<Redmine::Plugin:0x7f28330ca2f8>

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T10:50:19+00:00Added an answer on June 16, 2026 at 10:50 am

    You need a colon in front of controller on the second to last line. it should read menu :application_menu, :backups, { :controller => 'backups', :action => :index }, :caption => 'Backups', :last => 'true' so that :controller is a ruby symbol.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the simple following code, which is working in a ruby (not rails)
Using Rails 3.1.3 with Ruby 1.9.3p0. I've discovered that by default, Rails does not
Given that the Rails Way seems to be not to use foreign key constraints,
I'm not a Rails developer (currently) so please forgive my ignorance on this. One
I am a .net developer that was handed a ruby on rails application because
I'm not really a Rails developer and I'm working on someone else's code. Anyway,
I'm trying to write an import rakefile for Redmine. It uses ruby on rails.
I am a ASP.NET Developer trying to learn Rails and RESTful approach. To understand,
Background: I'm writing a 'standard' (nothing special) web application in Ruby (not Rails) and
I am writing some Ruby code, not Rails, and I need to handle something

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.