D
D
des1roer2017-02-18 09:34:24
Ruby on Rails
des1roer, 2017-02-18 09:34:24

Ruby on Rails rake aborted?

>
rake db:migrate --trace
rake aborted!
NameError: undefined local variable or method `__dir__' for main:Object
F:/OpenServer/domains/localhost/webrails/config/boot.rb:1:in `<top (required)>' F:/OpenServer/domains/localhost/webrails/config/application.rb:1:in `require_relative'
F:/OpenServer/domains/localhost/webrails/config/application.rb:1:in `<top (required)>'
F:/OpenServer/domains/localhost/webrails/Rakefile:4:in `require_relative'
F:/OpenServer/domains/localhost/webrails/Rakefile:4:in `<top (required)>'
C:/Ruby19/lib/ruby/gems/1.9.1/gems/rake-12.0.0/lib/rake/rake_module.rb:28:in `load'
C:/Ruby19/lib/ruby/gems/1.9.1/gems/rake-12.0.0/lib/rake/rake_module.rb:28:in `load_rakefile'
C:/Ruby19/lib/ruby/gems/1.9.1/gems/rake-12.0.0/lib/rake/application.rb:687:in `raw_load_rakefile'
C:/Ruby19/lib/ruby/gems/1.9.1/gems/rake-12.0.0/lib/rake/application.rb:96:in `block in load_rakefile'
C:/Ruby19/lib/ruby/gems/1.9.1/gems/rake-12.0.0/lib/rake/application.rb:178:in `standard_exception_handling'
C:/Ruby19/lib/ruby/gems/1.9.1/gems/rake-12.0.0/lib/rake/application.rb:95:in `load_rakefile'
C:/Ruby19/lib/ruby/gems/1.9.1/gems/rake-12.0.0/lib/rake/application.rb:79:in `block in run'
C:/Ruby19/lib/ruby/gems/1.9.1/gems/rake-12.0.0/lib/rake/application.rb:178:in `standard_exception_handling'
C:/Ruby19/lib/ruby/gems/1.9.1/gems/rake-12.0.0/lib/rake/application.rb:77:in `run'
C:/Ruby19/lib/ruby/gems/1.9.1/gems/rake-12.0.0/exe/rake:27:in `<top (required)>'

C:/Ruby19/bin/rake:23:in `load'
C:/Ruby19/bin/rake:23:in `<main>'

I use openserver and win10
> rails -v
Rails 5.0.1
> gem -v
1.8.24
> rake
rake aborted!

Answer the question

In order to leave comments, you need to log in

3 answer(s)
A
Andrey Andreev, 2017-02-18
@b0nn1e

The first thing a young Ruby on Rails developer is taught is to install and set up Ubuntu.

O
OnYourLips, 2017-02-18
@OnYourLips

C:/Ruby19
Update Ruby. Your version is very old.
__dir__ appeared in 2.0.

D
Dmitri Sinitsa, 2017-02-18
@unabl4

How did you install 5th rails on ruby ​​1.9.1? Minimal support since 2.2.x. 1.9.1 - terrible junk.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question