Stuck on Getting started section 4.3

127 views
Skip to first unread message

Jared Steck

unread,
Aug 1, 2014, 4:29:13 PM8/1/14
to rubyonra...@googlegroups.com
I have understood everything in the tutorial up to this sentence:
"Open the 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.
Thanks!

Benjamin Fleischer

unread,
Aug 2, 2014, 6:57:38 PM8/2/14
to rubyonra...@googlegroups.com


On Friday, August 1, 2014 3:29:13 PM UTC-5, Jared Steck wrote:

How do I open this file in my notepad++ and/or aptana studio 3 IDE?

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.

Sören Floderus

unread,
Oct 20, 2014, 7:06:33 AM10/20/14
to rubyonra...@googlegroups.com, jste...@gmail.com
Hi, this seems to be the proper heading for also this question:

In chapter 4, Hello Rails!, about those commands:

bin/rails server
and
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:

Rails.application.routes.draw do
get 'welcome/index'

only mine really says

Blog::Application.routes.draw do
get "welcome/index"

then when uncommenting the line beginning with root, which reads

# root :to => 'welcome#index'

to make it look something like:

root 'welcome#index'

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?)

Vijay Dev

unread,
Oct 20, 2014, 7:37:26 AM10/20/14
to rubyonra...@googlegroups.com, jste...@gmail.com
Hey

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. 


Regards
Vijay

Nicolas Cavigneaux

unread,
Oct 20, 2014, 7:38:30 AM10/20/14
to rubyonra...@googlegroups.com
Seems like you’re using an old version of Rails. The guide explain how to work with the latest one.


Nicolas Cavigneaux
http://www.bounga.org
http://www.cavigneaux.net

Sören Floderus

unread,
Oct 21, 2014, 7:27:06 AM10/21/14
to rubyonra...@googlegroups.com, jste...@gmail.com
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:
https://bitnami.com/stack/ruby/installer

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:

cd projects
rails new blog
cd blog/bin
rails server

and the welcome page displayed at http://localhost:3000/

Ctrl-C (then answer yes)

cd projects/blog/bin
rails generate controller welcome index

opened index.html.erb in blog/app/views/welcome to replace text with <h1>Hello, Rails from Blog!</h1>
opened routes.rb in in blog/config to uncomment the root line

rails server

displays Hello Rails from Blog! at http://localhost:3000/
Reply all
Reply to author
Forward
0 new messages