我正在研究Michael Hartl的教程,试图第一次学习Rails,我遇到了一些问题.我最近重新安装了整个Rails安装程序,因为我显然无意中删除了一些重要的文件.现在,当我尝试运行测试时,我收到以下错误:
sh.exe": /c/Program Files (x86)/ruby-1.9.3/bin/bundle: "c:/Program: bad interpre
ter: No such file or directory
Run Code Online (Sandbox Code Playgroud)
我检查了我的PATH并尝试使用此处概述的解决方案:找不到Bundle命令.坏解释器 ..但在"C:\ Program Files(x86)\ ruby-1.9.3\bin"周围加上引号对我没有任何作用.
我运行$ rails -v并得到以下输出:
$ rails -v
?[31mCould not find multi_json-1.3.6 in any of the sources?[0m
?[33mRun `bundle install` to install missing gems.?[0m
Run Code Online (Sandbox Code Playgroud)
那么我尝试运行$ bundle install并再次遇到以下问题:
Tom@TOM-PC /c/sample_app (updating-users)
$ bundle install
sh.exe": /c/Program Files (x86)/ruby-1.9.3/bin/bundle: "c:/Program: bad interpre
ter: No such file or directory
Run Code Online (Sandbox Code Playgroud)
我真的很感激任何帮助 - 我今天花了5个多小时试图恢复正常,但仍然不知所措.如果我遗漏任何相关信息,请告诉我 - 谢谢!
我第一次浏览Michael Hartl的教程并且无法完成第9章的第一次测试(第9.1.1节通过.我收到一条返回引用ActiveRecord的问题,但我检查了我的模式和参考代码我很难找到我的错误.有人因为在user_controller中缺少一行而导致此问题,但我仔细检查过,这似乎不是我的问题,所以任何帮助都会很多赞赏.
这是我得到的回报:
$ bundle exec rspec spec/requests/user_pages_spec.rb -e "edit page"
Run options: include {:full_description=>/(?-mix:edit\ page)/}
FFF
Failures:
1) User pages signup edit page
Failure/Error: before { visit signup_path }
ActiveRecord::StatementInvalid:
Could not find table 'users'
# ./app/controllers/users_controller.rb:8:in `new'
# ./app/controllers/users_controller.rb:8:in `new'
# ./spec/requests/user_pages_spec.rb:24:in `block (3 levels) in <top (required)>'
2) User pages signup edit page
Failure/Error: before { visit signup_path }
ActiveRecord::StatementInvalid:
Could not find table 'users'
# ./app/controllers/users_controller.rb:8:in `new'
# ./app/controllers/users_controller.rb:8:in `new'
# ./spec/requests/user_pages_spec.rb:24:in `block (3 …
Run Code Online (Sandbox Code Playgroud)