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

53 views
Skip to first unread message

David McDonald

unread,
Jan 20, 2019, 1:55:01 PM1/20/19
to Ruby on Rails: Talk
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)


David McDonald

unread,
Jan 20, 2019, 4:03:57 PM1/20/19
to Ruby on Rails: Talk
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".

Walter Lee Davis

unread,
Jan 20, 2019, 4:28:26 PM1/20/19
to rubyonra...@googlegroups.com
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

>
> --
> You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-ta...@googlegroups.com.
> To post to this group, send email to rubyonra...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/35aafab7-b79f-4a49-af7e-c2b3cfa92a85%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

David McDonald

unread,
Jan 20, 2019, 5:39:31 PM1/20/19
to Ruby on Rails: Talk
Thanks Walter!
Reply all
Reply to author
Forward
0 new messages