Skip to content

Instantly share code, notes, and snippets.

@jimsynz
Created December 25, 2011 20:20
Show Gist options
  • Save jimsynz/1519692 to your computer and use it in GitHub Desktop.
Save jimsynz/1519692 to your computer and use it in GitHub Desktop.
~$ cd HelloWorld
~/HelloWorld$ echo "gem 'emberjs-rails'" >> Gemfile
~/HelloWorld$ bundle
Fetching source index for http://rubygems.org/
Using rake (0.9.2.2)
Using multi_json (1.0.4)
Using activesupport (3.1.3)
Using builder (3.0.0)
Using i18n (0.6.0)
Using activemodel (3.1.3)
Using erubis (2.7.0)
Using rack (1.3.5)
Using rack-cache (1.1)
Using rack-mount (0.8.3)
Using rack-test (0.6.1)
Using hike (1.2.1)
Using tilt (1.3.3)
Using sprockets (2.0.3)
Using actionpack (3.1.3)
Using mime-types (1.17.2)
Using polyglot (0.3.3)
Using treetop (1.4.10)
Using mail (2.3.0)
Using actionmailer (3.1.3)
Using arel (2.2.1)
Using tzinfo (0.3.31)
Using activerecord (3.1.3)
Using activeresource (3.1.3)
Using ansi (1.4.1)
Using bundler (1.0.21)
Using coffee-script-source (1.2.0)
Using execjs (1.2.13)
Using coffee-script (2.2.0)
Using rack-ssl (1.3.2)
Using json (1.6.4)
Using rdoc (3.12)
Using thor (0.14.6)
Using railties (3.1.3)
Using coffee-rails (3.1.1)
Installing emberjs-rails (2011.12.22.1)
Using jquery-rails (1.0.19)
Using rails (3.1.3)
Using sass (3.1.12)
Using sass-rails (3.1.5)
Using sqlite3 (1.3.5)
Using turn (0.8.3)
Using uglifier (1.2.0)
Your bundle is complete! Use `bundle show [gemname]` to see where a bundled gem is installed.
# Create a new Ember.js application.
app = Ember.Application.create()
# explicitly add the app to the window object
# because CoffeeScript keeps all variables
# locally scoped by default.
window.App = app
# Create a new view using the template
# 'views_hello' - the name of the template
# is dynamically generated from the directory
# name and file name of the view asset.
# Normally Ember wraps all views in their
# own <div /> but we've explicityly
# asked it to wrap it in an <h1 /> tag.
# We've also created a property called
# text which will be rendered into the view.
hello_view = Ember.View.create
templateName: 'views_hello'
tagName: 'h1'
text: 'Hello World!'
hello_view.append()
# Add the view to the App so that it's
# easily accessible from outside.
app.helloView = hello_view
class HelloController < ApplicationController
layout 'ember'
end
<%= content_for :title do
'Hello World'
end %>
<%= content_for :description do
'Simple demonstration app.'
end %>
<%= content_for :author do
'James Harton <james@sociable.co.nz'
end %>
<%= javascript_include_tag 'views/hello' %>
HelloWorld::Application.routes.draw do
resources :hello
end
~/HelloWorld$ rails generate controller hello
create app/controllers/hello_controller.rb
invoke erb
create app/views/hello
invoke test_unit
create test/functional/hello_controller_test.rb
invoke helper
create app/helpers/hello_helper.rb
invoke test_unit
create test/unit/helpers/hello_helper_test.rb
invoke assets
invoke coffee
create app/assets/javascripts/hello.js.coffee
invoke scss
create app/assets/stylesheets/hello.css.scss
~$ gem install rails --version '>= 3.1'
Fetching: multi_json-1.0.4.gem (100%)
Fetching: activesupport-3.1.3.gem (100%)
Fetching: builder-3.0.0.gem (100%)
Fetching: i18n-0.6.0.gem (100%)
Fetching: activemodel-3.1.3.gem (100%)
Fetching: rack-1.3.5.gem (100%)
Fetching: rack-cache-1.1.gem (100%)
Fetching: rack-test-0.6.1.gem (100%)
Fetching: rack-mount-0.8.3.gem (100%)
Fetching: hike-1.2.1.gem (100%)
Fetching: tilt-1.3.3.gem (100%)
Fetching: sprockets-2.0.3.gem (100%)
Fetching: erubis-2.7.0.gem (100%)
Fetching: actionpack-3.1.3.gem (100%)
Fetching: arel-2.2.1.gem (100%)
Fetching: tzinfo-0.3.31.gem (100%)
Fetching: activerecord-3.1.3.gem (100%)
Fetching: activeresource-3.1.3.gem (100%)
Fetching: mime-types-1.17.2.gem (100%)
Fetching: polyglot-0.3.3.gem (100%)
Fetching: treetop-1.4.10.gem (100%)
Fetching: mail-2.3.0.gem (100%)
Fetching: actionmailer-3.1.3.gem (100%)
Fetching: rake-0.9.2.2.gem (100%)
Fetching: thor-0.14.6.gem (100%)
Fetching: rack-ssl-1.3.2.gem (100%)
Fetching: json-1.6.4.gem (100%)
Building native extensions. This could take a while...
Fetching: rdoc-3.12.gem (100%)
Depending on your version of ruby, you may need to install ruby rdoc/ri data:
<= 1.8.6 : unsupported
= 1.8.7 : gem install rdoc-data; rdoc-data --install
= 1.9.1 : gem install rdoc-data; rdoc-data --install
>= 1.9.2 : nothing to do! Yay!
Fetching: railties-3.1.3.gem (100%)
Fetching: bundler-1.0.21.gem (100%)
Fetching: rails-3.1.3.gem (100%)
Successfully installed multi_json-1.0.4
Successfully installed activesupport-3.1.3
Successfully installed builder-3.0.0
Successfully installed i18n-0.6.0
Successfully installed activemodel-3.1.3
Successfully installed rack-1.3.5
Successfully installed rack-cache-1.1
Successfully installed rack-test-0.6.1
Successfully installed rack-mount-0.8.3
Successfully installed hike-1.2.1
Successfully installed tilt-1.3.3
Successfully installed sprockets-2.0.3
Successfully installed erubis-2.7.0
Successfully installed actionpack-3.1.3
Successfully installed arel-2.2.1
Successfully installed tzinfo-0.3.31
Successfully installed activerecord-3.1.3
Successfully installed activeresource-3.1.3
Successfully installed mime-types-1.17.2
Successfully installed polyglot-0.3.3
Successfully installed treetop-1.4.10
Successfully installed mail-2.3.0
Successfully installed actionmailer-3.1.3
Successfully installed rake-0.9.2.2
Successfully installed thor-0.14.6
Successfully installed rack-ssl-1.3.2
Successfully installed json-1.6.4
Successfully installed rdoc-3.12
Successfully installed railties-3.1.3
Successfully installed bundler-1.0.21
Successfully installed rails-3.1.3
31 gems installed
Installing ri documentation for multi_json-1.0.4...
Installing ri documentation for activesupport-3.1.3...
unable to convert U+00E0 from UTF-8 to US-ASCII for lib/active_support/core_ext/string/conversions.rb, skipping
unable to convert U+00FC from UTF-8 to US-ASCII for lib/active_support/core_ext/string/multibyte.rb, skipping
unable to convert U+00C6 from UTF-8 to US-ASCII for lib/active_support/inflector/transliterate.rb, skipping
unable to convert U+00E9 from UTF-8 to US-ASCII for lib/active_support/multibyte/chars.rb, skipping
unable to convert U+00E9 from UTF-8 to US-ASCII for lib/active_support/multibyte/unicode.rb, skipping
Installing ri documentation for builder-3.0.0...
unable to convert "\xF1" to UTF-8 in conversion from ASCII-8BIT to UTF-8 to US-ASCII for README, skipping
unable to convert "\xF1" to UTF-8 in conversion from ASCII-8BIT to UTF-8 to US-ASCII for README.rdoc, skipping
Installing ri documentation for i18n-0.6.0...
unable to convert U+00C0 from UTF-8 to US-ASCII for lib/i18n/backend/transliterator.rb, skipping
unable to convert U+00E4 from UTF-8 to US-ASCII for lib/i18n/tests/interpolation.rb, skipping
unable to convert U+00E4 from UTF-8 to US-ASCII for lib/i18n/tests/localization/date.rb, skipping
unable to convert U+00E4 from UTF-8 to US-ASCII for lib/i18n/tests/localization/date_time.rb, skipping
unable to convert U+0421 from UTF-8 to US-ASCII for lib/i18n/tests/localization/procs.rb, skipping
unable to convert U+00E4 from UTF-8 to US-ASCII for lib/i18n/tests/localization/time.rb, skipping
unable to convert "\xC2" to UTF-8 in conversion from ASCII-8BIT to UTF-8 to US-ASCII for lib/i18n.rb, skipping
Installing ri documentation for activemodel-3.1.3...
Installing ri documentation for rack-1.3.5...
unable to convert "\xC3" to UTF-8 in conversion from ASCII-8BIT to UTF-8 to US-ASCII for README.rdoc, skipping
Installing ri documentation for rack-cache-1.1...
Installing ri documentation for rack-test-0.6.1...
Installing ri documentation for rack-mount-0.8.3...
Installing ri documentation for hike-1.2.1...
Installing ri documentation for tilt-1.3.3...
Installing ri documentation for sprockets-2.0.3...
Installing ri documentation for erubis-2.7.0...
Installing ri documentation for actionpack-3.1.3...
unable to convert U+20AC from UTF-8 to US-ASCII for lib/action_view/helpers/number_helper.rb, skipping
Installing ri documentation for arel-2.2.1...
Installing ri documentation for tzinfo-0.3.31...
Installing ri documentation for activerecord-3.1.3...
Installing ri documentation for activeresource-3.1.3...
Installing ri documentation for mime-types-1.17.2...
unable to convert "\xC3" to UTF-8 in conversion from ASCII-8BIT to UTF-8 to US-ASCII for lib/mime/types/application, skipping
unable to convert "\xC3" to UTF-8 in conversion from ASCII-8BIT to UTF-8 to US-ASCII for type-lists/application.txt, skipping
unable to convert "\xC3" to UTF-8 in conversion from ASCII-8BIT to UTF-8 to US-ASCII for History.rdoc, skipping
Installing ri documentation for polyglot-0.3.3...
Installing ri documentation for treetop-1.4.10...
Installing ri documentation for mail-2.3.0...
unable to convert U+00E9 from UTF-8 to US-ASCII for lib/mail/configuration.rb, skipping
unable to convert U+00FC from UTF-8 to US-ASCII for lib/mail/core_extensions/string/multibyte.rb, skipping
unable to convert U+3042 from UTF-8 to US-ASCII for lib/mail/encodings.rb, skipping
unable to convert U+3042 from UTF-8 to US-ASCII for lib/mail/message.rb, skipping
unable to convert U+00E9 from UTF-8 to US-ASCII for lib/mail/multibyte/chars.rb, skipping
unable to convert "\xC3" to UTF-8 in conversion from ASCII-8BIT to UTF-8 to US-ASCII for lib/mail/multibyte/unicode.rb, skipping
unable to convert "\xC3" to UTF-8 in conversion from ASCII-8BIT to UTF-8 to US-ASCII for CHANGELOG.rdoc, skipping
Installing ri documentation for actionmailer-3.1.3...
Installing ri documentation for rake-0.9.2.2...
unable to convert "\xC3" to UTF-8 in conversion from ASCII-8BIT to UTF-8 to US-ASCII for CHANGES, skipping
unable to convert "\xC3" to UTF-8 in conversion from ASCII-8BIT to UTF-8 to US-ASCII for doc/release_notes/rake-0.8.2.rdoc, skipping
unable to convert "\xC3" to UTF-8 in conversion from ASCII-8BIT to UTF-8 to US-ASCII for doc/release_notes/rake-0.8.3.rdoc, skipping
unable to convert "\xC3" to UTF-8 in conversion from ASCII-8BIT to UTF-8 to US-ASCII for doc/release_notes/rake-0.9.0.rdoc, skipping
unable to convert "\xC3" to UTF-8 in conversion from ASCII-8BIT to UTF-8 to US-ASCII for doc/release_notes/rake-0.9.1.rdoc, skipping
unable to convert "\xC3" to UTF-8 in conversion from ASCII-8BIT to UTF-8 to US-ASCII for doc/release_notes/rake-0.9.2.rdoc, skipping
Installing ri documentation for thor-0.14.6...
unable to convert "\xC3" to UTF-8 in conversion from ASCII-8BIT to UTF-8 to US-ASCII for lib/thor/invocation.rb, skipping
unable to convert "\xE2" to UTF-8 in conversion from ASCII-8BIT to UTF-8 to US-ASCII for README.md, skipping
Installing ri documentation for rack-ssl-1.3.2...
Installing ri documentation for json-1.6.4...
Installing ri documentation for rdoc-3.12...
unable to convert U+201D from UTF-8 to US-ASCII for lib/rdoc/text.rb, skipping
unable to convert "\xD0" to UTF-8 in conversion from ASCII-8BIT to UTF-8 to US-ASCII for History.rdoc, skipping
unable to convert U+0412 from UTF-8 to US-ASCII for LEGAL.rdoc, skipping
Installing ri documentation for railties-3.1.3...
Installing ri documentation for bundler-1.0.21...
unable to convert "\xC3" to UTF-8 in conversion from ASCII-8BIT to UTF-8 to US-ASCII for lib/bundler/vendor/thor/invocation.rb, skipping
Installing ri documentation for rails-3.1.3...
Installing RDoc documentation for multi_json-1.0.4...
Installing RDoc documentation for activesupport-3.1.3...
unable to convert U+00E0 from UTF-8 to US-ASCII for lib/active_support/core_ext/string/conversions.rb, skipping
unable to convert U+00FC from UTF-8 to US-ASCII for lib/active_support/core_ext/string/multibyte.rb, skipping
unable to convert U+00C6 from UTF-8 to US-ASCII for lib/active_support/inflector/transliterate.rb, skipping
unable to convert U+00E9 from UTF-8 to US-ASCII for lib/active_support/multibyte/chars.rb, skipping
unable to convert U+00E9 from UTF-8 to US-ASCII for lib/active_support/multibyte/unicode.rb, skipping
Installing RDoc documentation for builder-3.0.0...
unable to convert "\xF1" to UTF-8 in conversion from ASCII-8BIT to UTF-8 to US-ASCII for README, skipping
unable to convert "\xF1" to UTF-8 in conversion from ASCII-8BIT to UTF-8 to US-ASCII for README.rdoc, skipping
Installing RDoc documentation for i18n-0.6.0...
unable to convert U+00C0 from UTF-8 to US-ASCII for lib/i18n/backend/transliterator.rb, skipping
unable to convert U+00E4 from UTF-8 to US-ASCII for lib/i18n/tests/interpolation.rb, skipping
unable to convert U+00E4 from UTF-8 to US-ASCII for lib/i18n/tests/localization/date.rb, skipping
unable to convert U+00E4 from UTF-8 to US-ASCII for lib/i18n/tests/localization/date_time.rb, skipping
unable to convert U+0421 from UTF-8 to US-ASCII for lib/i18n/tests/localization/procs.rb, skipping
unable to convert U+00E4 from UTF-8 to US-ASCII for lib/i18n/tests/localization/time.rb, skipping
unable to convert "\xC2" to UTF-8 in conversion from ASCII-8BIT to UTF-8 to US-ASCII for lib/i18n.rb, skipping
Installing RDoc documentation for activemodel-3.1.3...
Installing RDoc documentation for rack-1.3.5...
unable to convert "\xC3" to UTF-8 in conversion from ASCII-8BIT to UTF-8 to US-ASCII for README.rdoc, skipping
Installing RDoc documentation for rack-cache-1.1...
Installing RDoc documentation for rack-test-0.6.1...
Installing RDoc documentation for rack-mount-0.8.3...
Installing RDoc documentation for hike-1.2.1...
Installing RDoc documentation for tilt-1.3.3...
Installing RDoc documentation for sprockets-2.0.3...
Installing RDoc documentation for erubis-2.7.0...
Installing RDoc documentation for actionpack-3.1.3...
unable to convert U+20AC from UTF-8 to US-ASCII for lib/action_view/helpers/number_helper.rb, skipping
Installing RDoc documentation for arel-2.2.1...
Installing RDoc documentation for tzinfo-0.3.31...
Installing RDoc documentation for activerecord-3.1.3...
Installing RDoc documentation for activeresource-3.1.3...
Installing RDoc documentation for mime-types-1.17.2...
unable to convert "\xC3" to UTF-8 in conversion from ASCII-8BIT to UTF-8 to US-ASCII for lib/mime/types/application, skipping
unable to convert "\xC3" to UTF-8 in conversion from ASCII-8BIT to UTF-8 to US-ASCII for type-lists/application.txt, skipping
unable to convert "\xC3" to UTF-8 in conversion from ASCII-8BIT to UTF-8 to US-ASCII for History.rdoc, skipping
Installing RDoc documentation for polyglot-0.3.3...
Installing RDoc documentation for treetop-1.4.10...
Installing RDoc documentation for mail-2.3.0...
unable to convert U+00E9 from UTF-8 to US-ASCII for lib/mail/configuration.rb, skipping
unable to convert U+00FC from UTF-8 to US-ASCII for lib/mail/core_extensions/string/multibyte.rb, skipping
unable to convert U+3042 from UTF-8 to US-ASCII for lib/mail/encodings.rb, skipping
unable to convert U+3042 from UTF-8 to US-ASCII for lib/mail/message.rb, skipping
unable to convert U+00E9 from UTF-8 to US-ASCII for lib/mail/multibyte/chars.rb, skipping
unable to convert "\xC3" to UTF-8 in conversion from ASCII-8BIT to UTF-8 to US-ASCII for lib/mail/multibyte/unicode.rb, skipping
unable to convert "\xC3" to UTF-8 in conversion from ASCII-8BIT to UTF-8 to US-ASCII for CHANGELOG.rdoc, skipping
Installing RDoc documentation for actionmailer-3.1.3...
Installing RDoc documentation for rake-0.9.2.2...
unable to convert "\xC3" to UTF-8 in conversion from ASCII-8BIT to UTF-8 to US-ASCII for CHANGES, skipping
unable to convert "\xC3" to UTF-8 in conversion from ASCII-8BIT to UTF-8 to US-ASCII for doc/release_notes/rake-0.8.2.rdoc, skipping
unable to convert "\xC3" to UTF-8 in conversion from ASCII-8BIT to UTF-8 to US-ASCII for doc/release_notes/rake-0.8.3.rdoc, skipping
unable to convert "\xC3" to UTF-8 in conversion from ASCII-8BIT to UTF-8 to US-ASCII for doc/release_notes/rake-0.9.0.rdoc, skipping
unable to convert "\xC3" to UTF-8 in conversion from ASCII-8BIT to UTF-8 to US-ASCII for doc/release_notes/rake-0.9.1.rdoc, skipping
unable to convert "\xC3" to UTF-8 in conversion from ASCII-8BIT to UTF-8 to US-ASCII for doc/release_notes/rake-0.9.2.rdoc, skipping
Installing RDoc documentation for thor-0.14.6...
unable to convert "\xC3" to UTF-8 in conversion from ASCII-8BIT to UTF-8 to US-ASCII for lib/thor/invocation.rb, skipping
unable to convert "\xE2" to UTF-8 in conversion from ASCII-8BIT to UTF-8 to US-ASCII for README.md, skipping
Installing RDoc documentation for rack-ssl-1.3.2...
Installing RDoc documentation for json-1.6.4...
Installing RDoc documentation for rdoc-3.12...
unable to convert U+201D from UTF-8 to US-ASCII for lib/rdoc/text.rb, skipping
unable to convert "\xD0" to UTF-8 in conversion from ASCII-8BIT to UTF-8 to US-ASCII for History.rdoc, skipping
unable to convert U+0412 from UTF-8 to US-ASCII for LEGAL.rdoc, skipping
Installing RDoc documentation for railties-3.1.3...
Installing RDoc documentation for bundler-1.0.21...
unable to convert "\xC3" to UTF-8 in conversion from ASCII-8BIT to UTF-8 to US-ASCII for lib/bundler/vendor/thor/invocation.rb, skipping
Installing RDoc documentation for rails-3.1.3...
~$ rails new HelloWorld
create
create README
create Rakefile
create config.ru
create .gitignore
create Gemfile
create app
create app/assets/images/rails.png
create app/assets/javascripts/application.js
create app/assets/stylesheets/application.css
create app/controllers/application_controller.rb
create app/helpers/application_helper.rb
create app/mailers
create app/models
create app/views/layouts/application.html.erb
create app/mailers/.gitkeep
create app/models/.gitkeep
create config
create config/routes.rb
create config/application.rb
create config/environment.rb
create config/environments
create config/environments/development.rb
create config/environments/production.rb
create config/environments/test.rb
create config/initializers
create config/initializers/backtrace_silencers.rb
create config/initializers/inflections.rb
create config/initializers/mime_types.rb
create config/initializers/secret_token.rb
create config/initializers/session_store.rb
create config/initializers/wrap_parameters.rb
create config/locales
create config/locales/en.yml
create config/boot.rb
create config/database.yml
create db
create db/seeds.rb
create doc
create doc/README_FOR_APP
create lib
create lib/tasks
create lib/tasks/.gitkeep
create lib/assets
create lib/assets/.gitkeep
create log
create log/.gitkeep
create public
create public/404.html
create public/422.html
create public/500.html
create public/favicon.ico
create public/index.html
create public/robots.txt
create script
create script/rails
create test/fixtures
create test/fixtures/.gitkeep
create test/functional
create test/functional/.gitkeep
create test/integration
create test/integration/.gitkeep
create test/unit
create test/unit/.gitkeep
create test/performance/browsing_test.rb
create test/test_helper.rb
create tmp/cache
create tmp/cache/assets
create vendor/assets/stylesheets
create vendor/assets/stylesheets/.gitkeep
create vendor/plugins
create vendor/plugins/.gitkeep
run bundle install
Fetching source index for http://rubygems.org/
Using rake (0.9.2.2)
Using multi_json (1.0.4)
Using activesupport (3.1.3)
Using builder (3.0.0)
Using i18n (0.6.0)
Using activemodel (3.1.3)
Using erubis (2.7.0)
Using rack (1.3.5)
Using rack-cache (1.1)
Using rack-mount (0.8.3)
Using rack-test (0.6.1)
Using hike (1.2.1)
Using tilt (1.3.3)
Using sprockets (2.0.3)
Using actionpack (3.1.3)
Using mime-types (1.17.2)
Using polyglot (0.3.3)
Using treetop (1.4.10)
Using mail (2.3.0)
Using actionmailer (3.1.3)
Using arel (2.2.1)
Using tzinfo (0.3.31)
Using activerecord (3.1.3)
Using activeresource (3.1.3)
Installing ansi (1.4.1)
Using bundler (1.0.21)
Installing coffee-script-source (1.2.0)
Installing execjs (1.2.13)
Installing coffee-script (2.2.0)
Using rack-ssl (1.3.2)
Using json (1.6.4)
Using rdoc (3.12)
Using thor (0.14.6)
Using railties (3.1.3)
Installing coffee-rails (3.1.1)
Installing jquery-rails (1.0.19)
Using rails (3.1.3)
Installing sass (3.1.12)
Installing sass-rails (3.1.5)
Installing sqlite3 (1.3.5) with native extensions
Installing turn (0.8.3)
Installing uglifier (1.2.0)
Your bundle is complete! Use `bundle show [gemname]` to see where a bundled gem is installed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment