Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feedback from user #53

Open
VaclovasV opened this issue Oct 25, 2016 · 10 comments
Open

Feedback from user #53

VaclovasV opened this issue Oct 25, 2016 · 10 comments

Comments

@VaclovasV
Copy link
Contributor

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
Copy link
Contributor Author

VaclovasV commented Oct 25, 2016

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.

@beniusij
Copy link

beniusij commented Oct 28, 2016

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.

@VaclovasV
Copy link
Contributor Author

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

@beniusij
Copy link

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.

@VaclovasV
Copy link
Contributor Author

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

@beniusij
Copy link

beniusij commented Nov 1, 2016

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

@VaclovasV
Copy link
Contributor Author

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

@beniusij
Copy link

beniusij commented Nov 8, 2016

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.

@VaclovasV
Copy link
Contributor Author

@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
Copy link
Contributor Author

image
This creates package.json in your project directory

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants