Performance icon indicating copy to clipboard operation
Performance copied to clipboard

Feedback from user

Open VaclovasV opened this issue 9 years ago • 10 comments

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

VaclovasV avatar Oct 25 '16 06:10 VaclovasV

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.

VaclovasV avatar Oct 25 '16 06:10 VaclovasV

I've have attempted to solve the problem as advised, but problem keeps occurring. Steps taken:

  1. Create controller "perftool" with action "index" in it
  2. Created route get '/perftool', to: 'perftool#index'
  3. 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 avatar Oct 28 '16 06:10 beniusij

@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?

VaclovasV avatar Oct 28 '16 06:10 VaclovasV

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.

beniusij avatar Oct 29 '16 20:10 beniusij

really, in node_modules directory? because it should be created in root project, where package.json is located, not inside node_modules.

VaclovasV avatar Oct 31 '16 16:10 VaclovasV

Please, see a screenshot of my working directory. As instructed, gulp task was executed in root of project. Screenshot

beniusij avatar Nov 01 '16 10:11 beniusij

@beniusij - how you are installing it and why you don't have gulpfile inside project (and there is no package.json file too)?

VaclovasV avatar Nov 01 '16 15:11 VaclovasV

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 avatar Nov 08 '16 13:11 beniusij

@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?)

VaclovasV avatar Nov 08 '16 14:11 VaclovasV

image This creates package.json in your project directory

image Here, you should add YOUR gulpfile, instead of editing existing one in node_modules.

VaclovasV avatar Nov 08 '16 14:11 VaclovasV