Here is information on redmine plugin development steps.

I . Creating a new Plugin

STEP 1:

For creating plugin , we need to first set RAILS_ENV variable as follows:

on window , just go to plugin directory i.e. C:\Bitnami\redmine-4.1.0-0\apps\redmine\htdocs\plugins , open CMD and enter following command

set RAILS_ENV=production

Note: In LINUX environment , command will be

export RAILS_ENV=”production”

STEP 2: Creating PLUGIN using ‘ Redmine Plugin Generator ‘

For generating a plugin using redmine plugin generator , first cd to your redmine directory

Command Syntax for creating a plugin will be

bundle exec ruby bin/rails generate redmine_plugin <plugin_name>

i.e. in case of leave management system , command will be

bundle exec ruby bin/rails generate redmine_plugin leave_man_sys

Note: we can give any name that we want

If above command gives error bundle not recognized as command ,

run command and allow ruby interpreter to install bundler gem

gem install bundler

After installing bundler , try again to generate plugin

This error occur because ruby version that comes with bitnami installer in ruby 2.7 (which is not compatible with multiple gems ), so we need to install ruby 2.5 separately (supports all gems ) . This error is due to multiple installations .

So , now we run command

bundle update –bundler

and

gem install bundler:1.16.6

Updating exesting bundler gem
Installing latest bundler gem

After successful execution of above commands , try creating plugin again .

Now this kind of error occur , which occur because we are runing command in plugins directory but we need to run commad in redmine directory .

Load Error (Directory Not Found)

Note : don’t run command in Bitnami\redmine-4.1.0 directory we need to run command in C:\Bitnami\redmine-4.1.0-0\apps\redmine or C:\Bitnami\redmine-4.1.0-0\apps\redmine\htdocs\plugins

Could Not Locate gemfile error

Now , when we run command at right location, it starts execution with some of the suggestions as follows

Directory Structure Creation
Suggestions For possible options for running rails command
Command Executed Successfully

After successful execution of command we have directory structure like follows:

Plugin Directory Structure Created By Redmine Plugin Generator

Now , check if plugin is listed in redmine application .

If plugin is not listed , restart redmine application or system itself .

After restart , you might see above error . This will be fixed after some time . We have to wait for it.( It’s a temporary error .)