How to install new plugin?

plugins

(Arul Baskar) #1

I have create manually new plugin create
my step
create folder -tsys
plugins/tsys
tsys inside create plugin.rb file
sample code:
name: skyline
about: A super simple plugin to demonstrate how plugins work
version: 0.0.1
authors: test Developer
PLUGIN_NAME ||= “discourse_tsys”.freeze
after_initialize do

Email::Styles.register_plugin_style do |fragment|

end

plugins/tsys/plugin.rb
create new folder app and config

plugins/tsys/app
plugins/tsys/config

app inside create folder controllers
plugins/tsys/app/controllers
controllers inside create tsys_controller.rb file
example code

class TsysController < ApplicationController

def index
puts " print log file"
end
end

routes file create location file name routes.rb
plugins/tsys/config

Rails.application.routes.draw do
get ‘tsys/index’ => 'tsys#index’
end

now error occurred
No route matches [GET] “/tsys/index”

please help me how to solve this issue. any sample code or steps


(Régis Hanol) #2

Have you restarted your rails webserver after adding that route?


(Arul Baskar) #3

yes am more than time restart the sever. but not working same error occurred.

please help me any sample code…


(Jeff Atwood) #4

Do not post duplicate topics, please.


(Arul Baskar) #5

ok. new post must be unique created.