How do I start a new app with Rails 6.0.0.beta1 ?

I was reading about Rails 6.0.0.beta1 on the Rails blog, but I’m unsure of how to do rails new app_name with 6.0.0.beta1.

daveomcd@LAPTOP-GDA9LTDQ:~/rails_projects$ rails 6.0.0.beta1 new my_blog --postgres

Traceback (most recent call last):

2: from /home/daveomcd/.rvm/gems/ruby-2.6.0/bin/rails:23:in `’

1: from /home/daveomcd/.rvm/rubies/ruby-2.6.0/lib/ruby/2.6.0/rubygems.rb:302:in `activate_bin_path’

/home/daveomcd/.rvm/rubies/ruby-2.6.0/lib/ruby/2.6.0/rubygems.rb:283:in `find_spec_for_exe’: can’t find gem railties (= 6.0.0.beta1) with executable rails (Gem::GemNotFoundException)

``

Not sure if there is a better way, but… I installed 5.2.2 then modified the Gemfile for the rails line to this:

gem ‘rails’, github: “rails/rails”, ref: “5a0230c67f852fb21173f99647e76336897446c1”

``

Which is the commit of 6.0.0.beta1. Then ran “bundle update”.

I was reading about Rails 6.0.0.beta1 on the Rails blog, but I'm unsure of how to do rails new app_name with 6.0.0.beta1.

daveomcd@LAPTOP-GDA9LTDQ:~/rails_projects$ rails _6.0.0.beta1_ new my_blog --postgres
Traceback (most recent call last):
        2: from /home/daveomcd/.rvm/gems/ruby-2.6.0/bin/rails:23:in `<main>'
        1: from /home/daveomcd/.rvm/rubies/ruby-2.6.0/lib/ruby/2.6.0/rubygems.rb:302:in `activate_bin_path'
/home/daveomcd/.rvm/rubies/ruby-2.6.0/lib/ruby/2.6.0/rubygems.rb:283:in `find_spec_for_exe': can't find gem railties (= 6.0.0.beta1) with executable rails (Gem::GemNotFoundException)

gem install rails --pre should get you the latest version, then to use it, you will use the "underscore trick" to choose which Rails you want at the command line. (Use this same trick to start an app with a lower-than-usual Rails version, for example if you need to create a new Rails 4.2 app for some reason.)

rails _6.0.0.beta1_ new my_test_app

Walter

Thanks Walter!