I have understood everything in the tutorial up to this sentence:
app/views/welcome/index.html.erb file in your text editor.”
How do I open this file in my notepad++ and/or aptana studio 3 IDE?
It expects me to know when I only just learned ruby a week ago.
Presumably you’ve opened files in your editor already to write or edit code. Opening the file should be the same in whatever IDE as it is in MS Word. In Windows, it’s usually File menu, open, or Ctrl+O. I don’t think your issue is related to Ruby or Rails, though. You need to be comfortable with your tools if you intend to code with them.
Hi, this seems to be the proper heading for also this question:
In chapter 4, Hello Rails!, about those commands:
bin/rails generate controller welcome index
suggest there is a bin folder in the blog directory; there wasn’t, so I just skipped the bin/
then when Setting the Application Home Page, opening config/routes.rb, it allegedly says:
only mine really says
then when uncommenting the line beginning with root, which reads
root :to => ‘welcome#index’
to make it look something like:
I not only uncommented, I also removed: :to =>
Then in localhost:3000 the Hello Rails! doesn’t show. Does it have to do with any of the above?
I’m on Windows XP having installed the package from railsinstaller.org (could this be the problem?)
Seems like you’re using an old version of Rails. The guide explain how to work with the latest one.
What is your Rails version?
The guides in guides.rubyonrails.org is for the stable rails and the one in edgeguides.rubyonrails.org is for rails master (edge) branch. There can be differences if your Rails version is different from the one assumed in guides.
Thanks Vijay and Nicolas, indeed, I uninstalled Railsinstaller which used Ruby 1.9 and Rails 3.2
(Then took a lengthy detour, following this page: http://railsapps.github.io/installing-rails.html, trying Railsbridge Virtual Machine, installing VirtualBox 4.2, then Vagrant_1.2.7.msi - only it couldn’t locate the railsbridgeboston URL and since as suggested by https://gorails.com/guides/using-vagrant-for-rails-development:
vagrant plugin install vagrant-vbguest
vagrant plugin install vagrant-librarian-chef
produced some error followed by the touch command not being recognized, I gave up and uninstalled Vagrant and VirtualBox.)
Instead, following https://www.ruby-lang.org/en/installation/#rubyinstaller, now there’d be only Bitnami Ruby Stack left for the MS Windows user:
Fine, I installed that, using port 81 for listening and 444 for access (instead of 80 and 443, respectively). It took some time, then passwords were removed from C:/Bitnam/rubystack-2.0.0-20/report.txt and stored elsewhere.
now running Rails 4.1.6, this finally worked:
opened Use Bitnami Ruby Stack for terminal prompt:
rails new blog
and the welcome page displayed at http://localhost:3000/
Ctrl-C (then answer yes)
rails generate controller welcome index
opened index.html.erb in blog/app/views/welcome to replace text with
Hello, Rails from Blog!
opened routes.rb in in blog/config to uncomment the root line
displays Hello Rails from Blog! at http://localhost:3000/