Web Preview always disabled

I've tried following the online documentation to create my first rails app. I get to the point in the documentation where it directs you to press "ALT+F2" to preview your view in a browser, and nothing happened. I then noticed that the View -> Web Preview menu item was grey'ed out (i.e. disabled). I've searched the discussions and issue tracker issues, and haven't found any answers. Some of the issues seemed to indicate the feature was removed, but it wasn't clear whether they were describing Rubymine or one of the other IDEs. Other issues indicated the feature existed, but wasn't working quite right. Someone also mentioned they got some message telling them they needed to download a plugin, but didn't mention the name of the plugin. I never got such a message. I'm running Rubymine 2.0.1, with a 32b Java 1.6, on Ubuntu 9.10

0
Avatar
Permanently deleted user

Hi Jeff,

I've tried following the online documentation to create my first rails app. I get to the point in the documentation where it directs you to press "ALT+F2" to preview your view in a browser, and nothing happened. I then noticed that the View -> Web Preview menu item was grey'ed out (i.e. disabled). I've searched the discussions and issue tracker issues, and haven't found any answers. Some of the issues seemed to indicate the feature was removed, but it wasn't clear whether they were describing Rubymine or one of the other IDEs. Other issues indicated the feature existed, but wasn't working quite right. Someone also mentioned they got some message telling them they needed to download a plugin, but didn't mention the name of the plugin. I never got such a message. I'm running Rubymine 2.0.1, with a 32b Java 1.6, on Ubuntu 9.10

View -> Web Preview action is available only when view file is opened in editor.
Also it will be available in right top corner of the window on hover:
preview.png

There was an action that allowed to open browser inside IDE (which required some external files), but it was removed.

Regards,
Oleg

0
Avatar
Permanently deleted user

I was following the instructions from your online documentation (See "Create and Run Your First Project"), and after step 4, my project structure in "Rails" format, looked like:

Capture.PNG
After step 7, the contents of "hello.html.erb" were:

<h1>Say#hello</h1>
<p>Find me in app/views/say/hello.html.erb</p>


The file is open in the editor (I'm looking at it), but there is no popup, and the View -> Web Preview... menu item is disabled.

Next suggestion?  

0
Avatar
Permanently deleted user

I just noticied that if I have the "say_controller.rb" file open in the editor, the browser popup is displayed in the upper right corner, and the Web Preview... menu item is finally enabled. I thought that you had to have the "view" open in the editor, and the view was the "hello.html.erb" file. Either I'm misunderstanding which files are views and which are controllers, or something is confused in Rubymine.

You can probably tell I'm a Rails newbie

0

Hello Jeff,

I've just tried the scenario in RubyMine 2.0.2 rc.

On my machine "Web Preview" enabled if
* view file (e.g. *.html.erb) is opened in active editor tab (i.e  I'm looking on its content)
* controller file is opened in active editor tab, and caret is located inside "view" method. E.g. if you place caret in word "Controller" in "SayHelloController" then "Web Preview" will be disabled.

0

请先登录再写评论。