[RUBY] How to display a browser preview in VS Code


macOS Catalina version: 10.15.7 (19H2)


I'm currently doing the 6th edition of the Ruby on Rails tutorial! I have built a Ruby on Rails environment locally for this tutorial and are using VS Code. I set it up with VS Code, hoping that there would be a "browser preview" like Cloud9 (AWS)!

How to put a browser preview

"Install" from the following page https://marketplace.visualstudio.com/items?itemName=auchenberg.vscode-browser-preview

Reference: https://coliss.com/articles/build-websites/operation/work/browser-preview-for-vscode.html

Show browser preview in VS Code

Preview display from the browser preview button. BrowserPreview.png

At this time, if you are a person who has never displayed the preview locally, you may be at a loss. * This is the main reason why I thought this article was processed.


  1. First, start Rails server with "rails s"
  2. Enter "http: // localhost: 3000 // " in the enclosed part and execute Path example: http: // localhost: 3000 // static_pages / home

You should now be able to see the browser preview! Try to be aware of the current directory when executing!

I hope this article helps someone! If anyone says "It was helpful!", I want you to press LGTM!

Recommended Posts

How to display a browser preview in VS Code
How to display a web page in Java
How to select a specified date by code in FSCalendar
How to display a graph in Ruby on Rails (LazyHighChart)
How to open a script file from Ubuntu with VS code
How to publish a library in jCenter
How to display error messages in Japanese
How to color code console output in Eclipse
Run a Spring Boot project in VS Code
Code to escape a JSON string in Java
How to run a djUnit task in Ant
How to create a theme in Liferay 7 / DXP
How to implement a like feature in Rails
How to easily create a pull-down in Rails
Make a snippet for Thymeleaf in VS Code
How to make a follow function in Rails
How to automatically generate a constructor in Eclipse
How to display characters entered in Spring Boot on a browser and reference links [Introduction to Spring Boot / For beginners]
How to implement UICollectionView in Swift with code only
How to clear all data in a particular table
How to create a Java environment in just 3 seconds
How to set the display time to Japan time in Rails
How to implement a like feature in Ajax in Rails
How to create a Spring Boot project in IntelliJ
How to create a data URI (base64) in Java
How to launch another command in a Ruby program
[How to insert a video in haml with Rails]
How to write a date comparison search in Rails
How to store Rakuten API data in a table
How to mock a super method call in PowerMock
How to convert A to a and a to A using AND and OR in Java
How to build Java development environment with VS Code
How to convert a file to a byte array in Java
[Rails 6] How to set a background image in Rails [CSS]
[Rails] How to load JavaScript in a specific view
How to write a core mod in Minecraft Forge 1.15.2
[Rails] How to display an image in the view
[Ruby/Rails] How to generate a password in a regular expression
[Personal application work memo] How to display a bar graph and a line graph in one graph
Create a private key / public key in CentOS8.2 and connect to SSH with VS Code
How to leave a comment
[Java] How to display Wingdings
Create a VS Code Plugin.
How to insert a video
How to create a method
How to deploy VS Code Remote Containers in a docker-compose project that includes both the API and the front app
How to correctly check the local HTML file in the browser
How to specify character code and line feed code in JAXB
How to change a string in an array to a number in Ruby
How to create a placeholder part to use in the IN clause
How to set character code and line feed code in Eclipse
How to store a string from ArrayList to String in Java (Personal)
How to add the same Indexes in a nested array
[Swift5] How to avoid applying dark mode (dark appearance) in code
How to implement one-line display of TextView in Android development
Mapping to a class with a value object in How to MyBatis
How to develop and register a Sota app in Java
How to simulate uploading a post-object form to OSS in Java
A memo to start Java programming with VS Code (2020-04 version)
How to create a service builder portlet in Liferay 7 / DXP
How to set up a proxy with authentication in Feign