Ruby on Rails newbie, learning the framework :-) I am trying to set up dev environment and get to welcome aboard page (default Rails server page) in localhost:3000.
Environment details:
(RVM managed) Ruby 2.2.2 and 2.2.3 on OSX
But tried only on Ruby 2.2.2. Installed Rails by creating a new project folder (does not have any special characters) and a Gemfile with below entries
source 'https://rubygems.org'
gem 'rails', github:'rails/rails'
gem 'arel', github: 'rails/arel'
gem 'rack', github: 'rack/rack'
gem 'sass-rails', github: 'rails/sass-rails'
gem 'sprockets', github: 'rails/sprockets'
gem 'sprockets-rails', '3.0.0.beta2'
bundle install command was successful (verified rails -v showed Rails 5.0.0 alpha)
issued rails new . command and replaced the existing Gemfile (got an error that unable to install Rails5.0.0 I guess Rails5.0.0 is not available as a Gem) so manually updated the Gemfile, now it looks like below
source 'https://rubygems.org'
gem 'rails', github:'rails/rails'
gem 'arel', github: 'rails/arel'
gem 'rack', github: 'rack/rack'
gem 'sass-rails', github: 'rails/sass-rails'
gem 'sprockets', github: 'rails/sprockets'
gem 'sprockets-rails', '3.0.0.beta2'
gem 'sqlite3'
gem 'uglifier', '>= 1.3.0'
gem 'coffee-rails', '~> 4.1.0'
gem 'jquery-rails'
gem 'turbolinks'
gem 'jbuilder', '~> 2.0'
group :development, :test do
gem 'byebug'
end
group :development do
gem 'web-console', '~> 2.0'
gem 'spring'
end
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]
Issued bundle update command and verified that rails -v shows Rails 5.0.0 alpha.
If I start rails server using rails server and hit http://localhost:3000/ I see something went wrong error page and the server logs does not show any useful messages :(
rails s
=> Booting WEBrick
=> Rails 5.0.0.alpha application starting in development on http://localhost:3000
=> Run `rails server -h` for more startup options
=> Ctrl-C to shutdown server
[2015-09-15 22:20:37] INFO WEBrick 1.3.1
[2015-09-15 22:20:37] INFO ruby 2.2.2 (2015-04-13) [x86_64-darwin14]
[2015-09-15 22:20:37] INFO WEBrick::HTTPServer#start: pid=69775 port=3000
DEPRECATION WARNING: before_filter is deprecated and will be removed in Rails 5.1. Use before_action instead. (called from block (3 levels) in <class:Engine> at /Users/manikandanviswanathan/.rvm/gems/ruby-2.2.2@Rails5/gems/turbolinks-2.5.3/lib/turbolinks.rb:14)
DEPRECATION WARNING: after_filter is deprecated and will be removed in Rails 5.1. Use after_action instead. (called from block (3 levels) in <class:Engine> at /Users/manikandanviswanathan/.rvm/gems/ruby-2.2.2@Rails5/gems/turbolinks-2.5.3/lib/turbolinks.rb:15)
Started GET "/" for ::1 at 2015-09-15 22:20:39 -0700
On a side note Rails4.2.2 is working well in my machine ! any help/advice is much appreciated.
Thanks !
rails c
instead ofrails s
. Sometimes, if there is an elusive error while running the server it will come up right away when starting the console. Who knows, you might get lucky... - Brad Werth