For somes test, i want to try rails 5 alpha and use the generator.
I just create a new application ( rails new test
)
I change the gemfile and add/replace :
gem 'rails', github: "rails/rails"
gem 'arel', github: 'rails/arel'
And i get this error :
~/c/test ❯❯❯ rails g model Model table_name:string model_name:string indexes:hstore
/Users/user/.rbenv/versions/2.2.2/lib/ruby/2.2.0/rubygems/dependency.rb:315:in `to_specs': Could not find 'railties' (>= 0) among 9 total gem(s) (Gem::LoadError)
Checked in 'GEM_PATH=/Users/user/codes/test/.gems:/Users/user/.rbenv/versions/2.2.2/gemsets/global:/Users/user/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0', execut
e `gem env` for more information
from /Users/user/.rbenv/versions/2.2.2/lib/ruby/2.2.0/rubygems/dependency.rb:324:in `to_spec'
from /Users/user/.rbenv/versions/2.2.2/lib/ruby/2.2.0/rubygems/core_ext/kernel_gem.rb:64:in `gem'
from /Users/user/codes/test/.gems/bin/rails:22:in `<main>'
How can i install the railties for rails 5 ?
If you follow these steps...
git clone https://github.com/rails/rails.git
cd rails/
bundle install
cd ../
./rails/railties/exe/rails new myapp --edge --dev
...then cd into myapp folder you should see...
ruby-2.2.2 marklocklear:myRails5App marklocklear$ rails -v
Rails 5.0.0.alpha
Note the --edge
and --dev
options when creating the app should set the Gemfile pointing to the right place.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With