以下是我在课程开始时的说明:
设置
clone the Backbone project
运行凉亭安装
clone the backend server
启动二进制文件
将--www flag指向Backbone项目的根目录
在http://localhost:8000
所以我使用npm install -g bower
命令安装了bower
然后我使用git clone url
来克隆上面列出的github项目和服务器。我不知道如何处理启动二进制文件和--www flag到骨干项目的根目录。它是什么意思和怎么做..?
在二进制的情况下,我遍历到服务器的二进制文件夹,运行文件
那么如何做下一部分-www标志到骨干项目的根源?
答案 0 :(得分:1)
如果您正确阅读说明,
启动二进制文件 将--www flag指向Backbone项目的根目录
是一步。您需要使用终端(Mac,Linux)中的from /app/vendor/bundle/ruby/2.2.0/gems/pg-0.18.4/lib/pg.rb:45:in `new'
from /app/vendor/bundle/ruby/2.2.0/gems/pg-0.18.4/lib/pg.rb:45:in `connect'
from /app/app/controllers/incomes-to-json.rb:5:in `<top (required)>'
from /app/vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.6/lib/active_support/dependencies.rb:274:in `require'
from /app/vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.6/lib/active_support/dependencies.rb:274:in `block in require'
from /app/vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.6/lib/active_support/dependencies.rb:240:in `load_dependency'
from /app/vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.6/lib/active_support/dependencies.rb:274:in `require'
from /app/vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.6/lib/active_support/dependencies.rb:360:in `require_or_load'
from /app/vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.6/lib/active_support/dependencies.rb:317:in `depend_on'
from /app/vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.6/lib/active_support/dependencies.rb:233:in `require_dependency'
from /app/vendor/bundle/ruby/2.2.0/gems/railties-4.2.6/lib/rails/engine.rb:472:in `block (2 levels) in eager_load!'
from /app/vendor/bundle/ruby/2.2.0/gems/railties-4.2.6/lib/rails/engine.rb:471:in `each'
from /app/vendor/bundle/ruby/2.2.0/gems/railties-4.2.6/lib/rails/engine.rb:471:in `block in eager_load!'
from /app/vendor/bundle/ruby/2.2.0/gems/railties-4.2.6/lib/rails/engine.rb:469:in `each'
from /app/vendor/bundle/ruby/2.2.0/gems/railties-4.2.6/lib/rails/engine.rb:469:in `eager_load!'
from /app/vendor/bundle/ruby/2.2.0/gems/railties-4.2.6/lib/rails/engine.rb:346:in `eager_load!'
from /app/vendor/bundle/ruby/2.2.0/gems/railties-4.2.6/lib/rails/application/finisher.rb:56:in `each'
from /app/vendor/bundle/ruby/2.2.0/gems/railties-4.2.6/lib/rails/application/finisher.rb:56:in `block in <module:Finisher>'
from /app/vendor/bundle/ruby/2.2.0/gems/railties-4.2.6/lib/rails/initializable.rb:30:in `instance_exec'
from /app/vendor/bundle/ruby/2.2.0/gems/railties-4.2.6/lib/rails/initializable.rb:30:in `run'
from /app/vendor/bundle/ruby/2.2.0/gems/railties-4.2.6/lib/rails/initializable.rb:55:in `block in run_initializers'
from /app/vendor/ruby-2.2.4/lib/ruby/2.2.0/tsort.rb:226:in `block in tsort_each'
from /app/vendor/ruby-2.2.4/lib/ruby/2.2.0/tsort.rb:348:in `block (2 levels) in each_strongly_connected_component'
from /app/vendor/ruby-2.2.4/lib/ruby/2.2.0/tsort.rb:429:in `each_strongly_connected_component_from'
from /app/vendor/ruby-2.2.4/lib/ruby/2.2.0/tsort.rb:347:in `block in each_strongly_connected_component'
from /app/vendor/ruby-2.2.4/lib/ruby/2.2.0/tsort.rb:345:in `each'
from /app/vendor/ruby-2.2.4/lib/ruby/2.2.0/tsort.rb:345:in `call'
from /app/vendor/ruby-2.2.4/lib/ruby/2.2.0/tsort.rb:345:in `each_strongly_connected_component'
from /app/vendor/ruby-2.2.4/lib/ruby/2.2.0/tsort.rb:224:in `tsort_each'
from /app/vendor/ruby-2.2.4/lib/ruby/2.2.0/tsort.rb:203:in `tsort_each'
from /app/vendor/bundle/ruby/2.2.0/gems/railties-4.2.6/lib/rails/initializable.rb:54:in `run_initializers'
from /app/vendor/bundle/ruby/2.2.0/gems/railties-4.2.6/lib/rails/application.rb:352:in `initialize!'
from /app/config/environment.rb:5:in `<top (required)>'
from /app/vendor/bundle/ruby/2.2.0/gems/railties-4.2.6/lib/rails/application.rb:328:in `require'
from /app/vendor/bundle/ruby/2.2.0/gems/railties-4.2.6/lib/rails/application.rb:328:in `require_environment!'
from /app/vendor/bundle/ruby/2.2.0/gems/railties-4.2.6/lib/rails/commands/commands_tasks.rb:142:in `require_application_and_environment!'
from /app/vendor/bundle/ruby/2.2.0/gems/railties-4.2.6/lib/rails/commands/commands_tasks.rb:67:in `console'
from /app/vendor/bundle/ruby/2.2.0/gems/railties-4.2.6/lib/rails/commands/commands_tasks.rb:39:in `run_command!'
from /app/vendor/bundle/ruby/2.2.0/gems/railties-4.2.6/lib/rails/commands.rb:17:in `<top (required)>'
from /app/bin/rails:9:in `require'
from /app/bin/rails:9:in `<main>'
标志或Windows中的命令提示符启动二进制文件。
我们假设您将frontend项目克隆到 let toolbar = UIToolbar(frame: CGRectMake(0, 0, viewController.view.frame.size.width, 35.0))
let flexibleSpace = UIBarButtonItem(barButtonSystemItem: UIBarButtonSystemItem.FlexibleSpace, target: viewController, action: nil)
let button1 = UIBarButtonItem(title: "A", style: UIBarButtonItemStyle.Plain, target: viewController, action: foo)
let button2 = UIBarButtonItem(title: "B", style: UIBarButtonItemStyle.Plain, target: viewController, action: bar)
let button3 = UIBarButtonItem(title: "C", style: UIBarButtonItemStyle.Plain, target: viewController, action: blah)
toolbar.items = [button1, flexibleSpace, button2, flexibleSpace, button3]
文件夹,将后端项目克隆到名为--www
的兄弟文件夹
在Windows中,您应该能够通过命令提示符从backbone-front
文件夹中执行backbone-back
。
答案 1 :(得分:1)
对于任何刚开始编写代码的人,现在都像我一样寻求帮助,在二进制文件中有3个文件,如果您将项目克隆到Windows,则每个文件用于不同的oparting系统(.exe用于Windows)。版本似乎是0kb,您需要直接从存储库中重新下载该文件,然后以文件名中的.exe运行命令,祝您好运! ^^
server_windows_amd64.exe --www = .. / .. / FEF-UdaciMeals-Backbone 使用二进制位置的cmd 还要确保您不仅在computor上安装了bower,而且还进入了中坚文件夹并执行了bower安装以安装bower.json文件。
答案 2 :(得分:0)
我将带您完成在Windows上安装应用程序的全部内容。我刚刚做了,这些说明都有效。 如果您还没有安装节点或凉亭,Google“bower install on windows”。第一页有正确的说明。为了澄清,该页面的标题是“如何安装NodeJS,Bower和Grunt ......”
之后,您将要克隆项目的前端和后端。 对于前端,请按照以下说明操作: https://github.com/udacity/FEF-UdaciMeals-Backbone 对于后端,请按照以下说明操作: https://github.com/udacity/FEF-UdaciMeals-Backbone-Server @T J是对的。当你运行./server_windows.amd64.exe
时,你会想要进入../../FEF-UdaciMeals-Backbone-Server/binaries如果您正确遵循了上述说明,那么您应该能够在localhost:8000启动该应用程序,这将为您提供404页面未找到错误。这是正常的,因为你还没有做任何事情。
答案 3 :(得分:0)
这是从二进制文件文件夹运行的正确行:
NewList
然后导航至localhost:8000,您将看到该应用程序。
答案 4 :(得分:0)
要将--www
标记到项目的根目录,首先需要确定正在运行的操作系统-您需要确定要从{{3 }}。如果您使用的是Mac OS,则可以从server_darwin_amd64
开始代码。我在Windows操作系统上运行,因此我将使用server_windows_amd64.exe
。
接下来,正确写出所有HTML,CSS和JS所在的前文件夹的行踪(目录)。即FEF-UdaciMeals-Backbone
。我必须在这里=
使用等号。这是我要写的地方:--www=../../FEF-UdaciMeals-Backbone
打开前端文件夹。
在bash终端中,当我cd
进入FEF-UdaciMeals-Backbone-Server/binaries
时,我可以使用以下代码运行程序:./server_windows_amd64.exe --www=../../FEF-UdaciMeals-Backbone
。
最后,您可以通过binary folder
找到您的网站注意:我的前端和后端文件夹是分开的。
希望对您有所帮助,或者使您了解如何打开程序。 :D