Fork, Commit, Merge - Easy Issue (Rails) #938
Labels
easy
first-contributor
first-contributors
good first issue
Good for newcomers
help wanted
Extra attention is needed
rails
ruby
rubyonrails
up-for-grabs
Fork, Commit, Merge - Easy Issue (Rails)
Create a Simple "Hello, Rails!" App in Ruby on Rails
Note: You don't have ask permission to start solving the issue or get assigned, since these issues are supposed to be always open for new contributors. The actions-user bot will reset the file back to previous state for the next contributor after your commit is merged. So you can just simply start working with the issue right away!
How to get started:
Open the
tasks/rails/easy
directory from the root of your project.Then start implementing your solution!
Objective:
Create a basic Ruby on Rails application that displays "Hello, Rails!" when visiting the home page.
Requirements:
Instructions:
First, make sure you are in the correct directory:
cd tasks/rails/easy
To create a new Rails application, you can use the following command:
This will create a new directory called
hello_rails
containing a new Rails application. You can then navigate into your new app's directory:cd hello_rails
To generate a new controller called Welcome, run:
After that, you'll want to edit the
app/controllers/welcome_controller.rb
file to add an index action. Then, you'll also add a corresponding view inapp/views/welcome/index.html.erb
that displays "Hello, Rails!".Finally, you can set the root URL of your application to point to this index action by editing
config/routes.rb
:Now, you should be able to run your Rails application and see "Hello, Rails!" when you visit http://localhost:3000. To start the server, use:
To work with this issue, you need to have Ruby and Rails installed to your local machine.
Check out README.md for more instructions of installing Ruby and Rails and how to make a pull request.
Feel free to ask any questions here if you have some problems!
Also, kindly give this project a star to enhance its visibility for new developers!
The text was updated successfully, but these errors were encountered: