Feedback from user
Hi, I am writing regarding PerfTool. I have attempted to install and use this tool together with Rails 5 application. Following the instructions provided, installation was successful. However, it was not possible to use the tool, as routing problem occurred saying it "No route matches [GET] /perf-tool". Would it be possible to rails specific instructions to make this tool work? Best regards, Juozas Beniusis
In my opinion, this could be resolved, just user needs to add route, that will allow to navigate in directory. Answered to user by email, sent link to github issue.
I've have attempted to solve the problem as advised, but problem keeps occurring. Steps taken:
- Create controller "perftool" with action "index" in it
- Created route
get '/perftool', to: 'perftool#index' - Added line of code to "index" action in controller
render "#{Rails.root}/node_modules/devbridge-perf-tool/index.html"
Error occurring:
Missing template home/zeus/ruby_workspace/juozasben/node_mdules/devbridge-perf-tool/index.html with {:locale=>[:en], :formats=>[:html], :variants=>[], :handlers=>[:raw, :erb, :html, :builder, :ruby, :coffee, :jbuilder]}. Searched in: * "/home/zeus/ruby_workspace/juozasben/app/views"
Any advice on how this should be handled would be appreciated.
@beniusij - can you describe, why third step is added? After launching gulp task, do you have perf-tool directory created in same level as node_modules are?
Third step was added to link route to the directory of perf-tool. Therefore, I thought best solution would be to render index.html file in the directory. After launching gulp task, devbridge-perf-tool folder was created in node_modules directory. Breadcrumbs would be: MyProject > node_modules > devbridge-perf-tool.
really, in node_modules directory? because it should be created in root project, where package.json is located, not inside node_modules.
Please, see a screenshot of my working directory. As instructed, gulp task was executed in root of project.

@beniusij - how you are installing it and why you don't have gulpfile inside project (and there is no package.json file too)?
Using command line:
$ cd ruby_workspace/juozasben
$ npm install devbridge-perf-tool --save-dev
After that, I add block of code (see below) to the top of gulpfile.js.
require('gulp').task('perf-tool', function () {
var options = {
siteURL:'http://www.google.com',
sitePages: ['/', '/voice']
};
return require('devbridge-perf-tool').performance(options);
});
Finally, I go to http://localhost:3000/peftool and that is it.
There were no requirements stating that gulpfile or package.json are required, nor instructions on obtaining those two prior tool's installation.
@beniusij this is self explanatory, no one is running modules and editing files in node_modules (as I understand, you tried to run it from node_modules directory?)
This creates package.json in your project directory
Here, you should add YOUR gulpfile, instead of editing existing one in node_modules.