I've just finished Chapter 3 of Micheal Hartl's Ruby on Rails Tutorial. At the last portion of this chapter, he asked to configure the gitignore file to not run in conflict with the spring server "supplied by Rails to speed up loading time". I'm entirely new to programming, and want to get a slightly clearer picture of what this Spring server is. I tried googling it but there are no laymanized answers. Thanks!
Spring is a Rails application preloader that speeds up development by keeping your application running in the background. This means you that don't need to restart a server when you make changes. In RubyMine, Spring can be used to run Rails generators, tests, and Rake tasks.
Rails and Spring Boot can be categorized as "Frameworks (Full Stack)" tools. "Rapid development", "Great gems" and "Great community" are the key factors why developers consider Rails; whereas "Powerful and handy", "Easy setup" and "Java" are the primary reasons why Spring Boot is favored.
Go to your browser and open http://localhost:3000, you will see a basic Rails app running. You can also use the alias "s" to start the server: bin/rails s . The server can be run on a different port using the -p option. The default development environment can be changed using -e .
To stop spring you can use bin/spring stop . It should start automatically when you run rails commands.
In the Spring GitHub page, it is clearly mentioned that:
Spring is a Rails application preloader. It speeds up development by keeping your application running in the background so you don't need to boot it every time you run a test, rake task or migration.
This simply means that Spring is the unit in charge of reloading your code any time you make changes to it so that you don't have to restart the server each time you make those changes.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With