No (it depends)
Editing just to gain rep is... not a good idea. I don't know if there are rules against it, but you might gain personal dislike of others (which might lead to downvotes). You might be suspended from editing or participating in the website, or your posts might be locked if you do so.
You need to make edits that improves the post. You might make major edits (for example, when the method no longer works) or you might do minor yet good edits (for example if the UI changed, you can change the images. You can also fix the grammar etc.). These are acceptable ways to edit a question.
If you just want views on that question, put a bounty on it. Your question is nearly guaranteed to get more views, and you might get more upvotes. You don't have to ask for new answers with a bounty- just stating that you'll give the bounty to one of the answers (because it is good etc) is an acceptable reason too.