Rule not found in stackstorm

when I create rule its throwing error.
rule is not found.what would be the problem for this.

It will be very hard for anyone to help you without any details of the rule or the error being produced.

Current best guess, you forgot to reload StackStorm after adding a new rule. st2ctl reload --register-all will pickup any new metadata files.

st2-rule-tester --rule=./sample_rule_with_webhook.yaml --trigger-instance=./sample_rule_with_actiontrigger.yaml} --config-file=/etc/st2/st2.conf

Traceback (most recent call last):
File “/usr/bin/st2-rule-tester”, line 21, in
rule_tester.main()
File “/opt/stackstorm/st2/lib/python3.6/site-packages/st2reactor/cmd/rule_tester.py”, line 58, in main
matches = tester.evaluate()
File “/opt/stackstorm/st2/lib/python3.6/site-packages/st2reactor/rules/tester.py”, line 67, in evaluate
trigger_instance_db, trigger_db = self._get_trigger_instance_db()
File “/opt/stackstorm/st2/lib/python3.6/site-packages/st2reactor/rules/tester.py”, line 130, in _get_trigger_instance_db
file_path=os.path.realpath(self._trigger_instance_file_path))
File “/opt/stackstorm/st2/lib/python3.6/site-packages/st2reactor/rules/tester.py”, line 153, in _get_trigger_instance_db_from_file
data = self._meta_loader.load(file_path=file_path)
File “/opt/stackstorm/st2/lib/python3.6/site-packages/st2common/content/loader.py”, line 237, in load
(file_ext, file_path, ALLOWED_EXTS))
Exception: Unsupported meta type .yaml}, file /usr/share/doc/st2/examples/rules/sample_rule_with_actiontrigger.yaml}. Allowed: [’.yaml’, ‘.yml’]

these error i get when testing errors if i write separate rules i am getting it as no rules found

The error message you’re seeing is because you’ve tried passing ./sample_rule_with_actiontrigger.yaml} but st2 expects a filename ending with .yaml or .yml.