gpt4 book ai didi

sproutcore - 入门教程错误 : uncaught throw "Cannot file target sproutcore for entry lib/index.rhtml"

转载 作者:行者123 更新时间:2023-12-03 13:37:57 31 4
gpt4 key购买 nike

我使用的是 Mac OS-X Lion,已经预装了 Ruby on Rails 3.0,并正在做 Sproutcore 的入门教程 (http://sproutcore.com/guides/getting_started.html)。当我运行服务器并点击:http://localhost:4020/todos .我在终端中收到以下错误:

   bash-3.2# sc-server 
SproutCore v1.7.1.beta Development Server
Allowing access only from IPs: 127.0.0.1. Use --allow-from-ips='*.*.*.*' to allow all
Starting server at http://0.0.0.0:4020 in debug mode
To quit sc-server, press Control-C
>> Thin web server (v1.2.11 codename Bat-Shit Crazy)
>> Maximum connections set to 1024
>> Listening on 0.0.0.0:4020, CTRL+C to stop
WARN 22:18:34.009 ~ Could not find target sproutcore/core_foundation that is required by /todos
WARN 22:18:34.009 ~ Could not find target sproutcore/empty_theme that is required by /todos
WARN 22:18:34.009 ~ Could not find target sproutcore/core_foundation that is required by /todos
ArgumentError: uncaught throw "Cannot file target sproutcore for entry lib/index.rhtml"
/usr/local/sproutcore/lib/sproutcore/models/manifest.rb:316:in `throw'
/usr/local/sproutcore/lib/sproutcore/models/manifest.rb:316:in `entry_for'
/usr/local/sproutcore/lib/sproutcore/builders/html.rb:55:in `layout_entry'
/usr/local/sproutcore/lib/sproutcore/builders/html.rb:61:in `layout_path'
/usr/local/sproutcore/lib/sproutcore/builders/html.rb:106:in `render'
/usr/local/sproutcore/lib/sproutcore/builders/html.rb:122:in `build'
/usr/local/sproutcore/lib/sproutcore/builders/base.rb:35:in `build'
/usr/local/sproutcore/lib/buildtasks/build.rake:68:in `block (2 levels) in define!'
/usr/local/sproutcore/lib/sproutcore/buildfile/task.rb:231:in `call'
/usr/local/sproutcore/lib/sproutcore/buildfile/task.rb:231:in `block in execute'
/usr/local/sproutcore/lib/sproutcore/buildfile/task.rb:226:in `each'
/usr/local/sproutcore/lib/sproutcore/buildfile/task.rb:226:in `execute'
/usr/local/sproutcore/lib/sproutcore/buildfile/task.rb:183:in `invoke_with_call_chain'
/usr/local/sproutcore/lib/sproutcore/buildfile/task.rb:140:in `invoke'
/usr/local/sproutcore/lib/sproutcore/buildfile.rb:214:in `invoke'
/usr/local/sproutcore/lib/sproutcore/models/manifest_entry.rb:347:in `build_to'
/usr/local/sproutcore/lib/sproutcore/models/manifest_entry.rb:259:in `build!'
/usr/local/sproutcore/lib/sproutcore/rack/builder.rb:129:in `block (2 levels) in call'
/usr/local/sproutcore/lib/sproutcore.rb:161:in `profile'
/usr/local/sproutcore/lib/sproutcore/rack/builder.rb:128:in `block in call'
<internal:prelude>:10:in `synchronize'
/usr/local/sproutcore/lib/sproutcore/rack/builder.rb:89:in `call'
/usr/local/sproutcore/bundle/ruby/1.9.1/gems/rack-1.4.0/lib/rack/cascade.rb:23:in `block in call'
/usr/local/sproutcore/bundle/ruby/1.9.1/gems/rack-1.4.0/lib/rack/cascade.rb:22:in `each'
/usr/local/sproutcore/bundle/ruby/1.9.1/gems/rack-1.4.0/lib/rack/cascade.rb:22:in `call'
/usr/local/sproutcore/bundle/ruby/1.9.1/gems/rack-1.4.0/lib/rack/showexceptions.rb:24:in `call'
/usr/local/sproutcore/bundle/ruby/1.9.1/gems/rack-1.4.0/lib/rack/recursive.rb:43:in `_call'
/usr/local/sproutcore/bundle/ruby/1.9.1/gems/rack-1.4.0/lib/rack/recursive.rb:38:in `call'
/usr/local/sproutcore/bundle/ruby/1.9.1/gems/rack-1.4.0/lib/rack/conditionalget.rb:25:in `call'
/usr/local/sproutcore/lib/sproutcore/rack/restrict_ip.rb:59:in `call'
/usr/local/sproutcore/lib/sproutcore/rack/service.rb:117:in `call'
/usr/local/sproutcore/bundle/ruby/1.9.1/gems/thin-1.2.11/lib/thin/connection.rb:84:in `block in pre_process'
/usr/local/sproutcore/bundle/ruby/1.9.1/gems/thin-1.2.11/lib/thin/connection.rb:82:in `catch'
/usr/local/sproutcore/bundle/ruby/1.9.1/gems/thin-1.2.11/lib/thin/connection.rb:82:in `pre_process'
/usr/local/sproutcore/bundle/ruby/1.9.1/gems/thin-1.2.11/lib/thin/connection.rb:57:in `process'
/usr/local/sproutcore/bundle/ruby/1.9.1/gems/thin-1.2.11/lib/thin/connection.rb:42:in `receive_data'
/usr/local/sproutcore/bundle/ruby/1.9.1/gems/eventmachine-1.0.0.beta.4/lib/eventmachine.rb:179:in `run_machine'
/usr/local/sproutcore/bundle/ruby/1.9.1/gems/eventmachine-1.0.0.beta.4/lib/eventmachine.rb:179:in `run'
/usr/local/sproutcore/bundle/ruby/1.9.1/gems/thin-1.2.11/lib/thin/backends/base.rb:61:in `start'
/usr/local/sproutcore/bundle/ruby/1.9.1/gems/thin-1.2.11/lib/thin/server.rb:159:in `start'
/usr/local/sproutcore/bundle/ruby/1.9.1/gems/rack-1.4.0/lib/rack/handler/thin.rb:13:in `run'
/usr/local/sproutcore/lib/sproutcore/rack/service.rb:93:in `start'
/usr/local/sproutcore/lib/sproutcore/tools/server.rb:65:in `server'
/usr/local/sproutcore/bundle/ruby/1.9.1/gems/thor-0.14.6/lib/thor/task.rb:22:in `run'
/usr/local/sproutcore/bundle/ruby/1.9.1/gems/thor-0.14.6/lib/thor/invocation.rb:118:in `invoke_task'
/usr/local/sproutcore/bundle/ruby/1.9.1/gems/thor-0.14.6/lib/thor.rb:263:in `dispatch'
/usr/local/sproutcore/bundle/ruby/1.9.1/gems/thor-0.14.6/lib/thor/base.rb:389:in `start'
/usr/local/sproutcore/lib/sproutcore/tools.rb:452:in `start'
/usr/local/sproutcore/lib/sproutcore/tools.rb:30:in `invoke'
/usr/bin/sc-server:11:in `<main>'
ArgumentError: uncaught throw "Cannot file target sproutcore for entry lib/index.rhtml"
/usr/local/sproutcore/lib/sproutcore/models/manifest.rb:316:in `throw'
/usr/local/sproutcore/lib/sproutcore/models/manifest.rb:316:in `entry_for'
/usr/local/sproutcore/lib/sproutcore/builders/html.rb:55:in `layout_entry'
/usr/local/sproutcore/lib/sproutcore/builders/html.rb:61:in `layout_path'
/usr/local/sproutcore/lib/sproutcore/builders/html.rb:106:in `render'
/usr/local/sproutcore/lib/sproutcore/builders/html.rb:122:in `build'
/usr/local/sproutcore/lib/sproutcore/builders/base.rb:35:in `build'
/usr/local/sproutcore/lib/buildtasks/build.rake:68:in `block (2 levels) in define!'
/usr/local/sproutcore/lib/sproutcore/buildfile/task.rb:231:in `call'
/usr/local/sproutcore/lib/sproutcore/buildfile/task.rb:231:in `block in execute'
/usr/local/sproutcore/lib/sproutcore/buildfile/task.rb:226:in `each'
/usr/local/sproutcore/lib/sproutcore/buildfile/task.rb:226:in `execute'
/usr/local/sproutcore/lib/sproutcore/buildfile/task.rb:183:in `invoke_with_call_chain'
/usr/local/sproutcore/lib/sproutcore/buildfile/task.rb:140:in `invoke'
/usr/local/sproutcore/lib/sproutcore/buildfile.rb:214:in `invoke'
/usr/local/sproutcore/lib/sproutcore/models/manifest_entry.rb:347:in `build_to'
/usr/local/sproutcore/lib/sproutcore/models/manifest_entry.rb:259:in `build!'
/usr/local/sproutcore/lib/sproutcore/rack/builder.rb:129:in `block (2 levels) in call'
/usr/local/sproutcore/lib/sproutcore.rb:161:in `profile'
/usr/local/sproutcore/lib/sproutcore/rack/builder.rb:128:in `block in call'
<internal:prelude>:10:in `synchronize'
/usr/local/sproutcore/lib/sproutcore/rack/builder.rb:89:in `call'
/usr/local/sproutcore/bundle/ruby/1.9.1/gems/rack-1.4.0/lib/rack/cascade.rb:23:in `block in call'
/usr/local/sproutcore/bundle/ruby/1.9.1/gems/rack-1.4.0/lib/rack/cascade.rb:22:in `each'
/usr/local/sproutcore/bundle/ruby/1.9.1/gems/rack-1.4.0/lib/rack/cascade.rb:22:in `call'
/usr/local/sproutcore/bundle/ruby/1.9.1/gems/rack-1.4.0/lib/rack/showexceptions.rb:24:in `call'
/usr/local/sproutcore/bundle/ruby/1.9.1/gems/rack-1.4.0/lib/rack/recursive.rb:43:in `_call'
/usr/local/sproutcore/bundle/ruby/1.9.1/gems/rack-1.4.0/lib/rack/recursive.rb:38:in `call'
/usr/local/sproutcore/bundle/ruby/1.9.1/gems/rack-1.4.0/lib/rack/conditionalget.rb:25:in `call'
/usr/local/sproutcore/lib/sproutcore/rack/restrict_ip.rb:59:in `call'
/usr/local/sproutcore/lib/sproutcore/rack/service.rb:117:in `call'
/usr/local/sproutcore/bundle/ruby/1.9.1/gems/thin-1.2.11/lib/thin/connection.rb:84:in `block in pre_process'
/usr/local/sproutcore/bundle/ruby/1.9.1/gems/thin-1.2.11/lib/thin/connection.rb:82:in `catch'
/usr/local/sproutcore/bundle/ruby/1.9.1/gems/thin-1.2.11/lib/thin/connection.rb:82:in `pre_process'
/usr/local/sproutcore/bundle/ruby/1.9.1/gems/thin-1.2.11/lib/thin/connection.rb:57:in `process'
/usr/local/sproutcore/bundle/ruby/1.9.1/gems/thin-1.2.11/lib/thin/connection.rb:42:in `receive_data'
/usr/local/sproutcore/bundle/ruby/1.9.1/gems/eventmachine-1.0.0.beta.4/lib/eventmachine.rb:179:in `run_machine'
/usr/local/sproutcore/bundle/ruby/1.9.1/gems/eventmachine-1.0.0.beta.4/lib/eventmachine.rb:179:in `run'
/usr/local/sproutcore/bundle/ruby/1.9.1/gems/thin-1.2.11/lib/thin/backends/base.rb:61:in `start'
/usr/local/sproutcore/bundle/ruby/1.9.1/gems/thin-1.2.11/lib/thin/server.rb:159:in `start'
/usr/local/sproutcore/bundle/ruby/1.9.1/gems/rack-1.4.0/lib/rack/handler/thin.rb:13:in `run'
/usr/local/sproutcore/lib/sproutcore/rack/service.rb:93:in `start'
/usr/local/sproutcore/lib/sproutcore/tools/server.rb:65:in `server'
/usr/local/sproutcore/bundle/ruby/1.9.1/gems/thor-0.14.6/lib/thor/task.rb:22:in `run'
/usr/local/sproutcore/bundle/ruby/1.9.1/gems/thor-0.14.6/lib/thor/invocation.rb:118:in `invoke_task'
/usr/local/sproutcore/bundle/ruby/1.9.1/gems/thor-0.14.6/lib/thor.rb:263:in `dispatch'
/usr/local/sproutcore/bundle/ruby/1.9.1/gems/thor-0.14.6/lib/thor/base.rb:389:in `start'
/usr/local/sproutcore/lib/sproutcore/tools.rb:452:in `start'
/usr/local/sproutcore/lib/sproutcore/tools.rb:30:in `invoke'
/usr/bin/sc-server:11:in `<main>'

这是我点击页面时的日志:
    ArgumentError at /todos
uncaught throw "Cannot file target sproutcore for entry lib/index.rhtml"

Ruby /usr/local/sproutcore/lib/sproutcore/models/manifest.rb: in throw, line 316
Web GET localhost/todos
Jump to:
GETPOSTCookiesENV
Traceback (innermost first)

/usr/local/sproutcore/lib/sproutcore/models/manifest.rb: in throw
throw "Cannot file target #{target_name} for entry #{filename}"...
/usr/local/sproutcore/lib/sproutcore/models/manifest.rb: in entry_for
throw "Cannot file target #{target_name} for entry #{filename}"...
/usr/local/sproutcore/lib/sproutcore/builders/html.rb: in layout_entry
@manifest.entry_for(@layout) || @manifest.entry_for(@layout, :hidden => true)...
/usr/local/sproutcore/lib/sproutcore/builders/html.rb: in layout_path
entry = layout_entry...
/usr/local/sproutcore/lib/sproutcore/builders/html.rb: in render
if self.layout_path.nil?...
/usr/local/sproutcore/lib/sproutcore/builders/html.rb: in build
writelines dst_path, [self.render]...
/usr/local/sproutcore/lib/sproutcore/builders/base.rb: in build
new(entry).build(dst_path)...
/usr/local/sproutcore/lib/buildtasks/build.rake: in block (2 levels) in define!
SC::Builder::Html.build env[:entry], env[:dst_path]...
/usr/local/sproutcore/lib/sproutcore/buildfile/task.rb: in call
act.call(self, args)...
/usr/local/sproutcore/lib/sproutcore/buildfile/task.rb: in block in execute
act.call(self, args)...
/usr/local/sproutcore/lib/sproutcore/buildfile/task.rb: in each
@actions.each do |act|...
/usr/local/sproutcore/lib/sproutcore/buildfile/task.rb: in execute
@actions.each do |act|...
/usr/local/sproutcore/lib/sproutcore/buildfile/task.rb: in invoke_with_call_chain
execute(task_args) if needed?...
/usr/local/sproutcore/lib/sproutcore/buildfile/task.rb: in invoke
invoke_with_call_chain(task_args, InvocationChain::EMPTY)...
/usr/local/sproutcore/lib/sproutcore/buildfile.rb: in invoke
self[task_name].invoke(consts)...
/usr/local/sproutcore/lib/sproutcore/models/manifest_entry.rb: in build_to
buildfile.invoke self[:build_task],...
/usr/local/sproutcore/lib/sproutcore/models/manifest_entry.rb: in build!
build_to self[:build_path]...
/usr/local/sproutcore/lib/sproutcore/rack/builder.rb: in block (2 levels) in call
entry.clean!.build!...
/usr/local/sproutcore/lib/sproutcore.rb: in profile
yield...
/usr/local/sproutcore/lib/sproutcore/rack/builder.rb: in block in call
SC.profile("PROFILE_BUILD") do...
<internal:prelude>: in synchronize
/usr/local/sproutcore/lib/sproutcore/rack/builder.rb: in call
project_mutex.synchronize do...
/usr/local/sproutcore/bundle/ruby/1.9.1/gems/rack-1.4.0/lib/rack/cascade.rb: in block in call
result = app.call(env)...
/usr/local/sproutcore/bundle/ruby/1.9.1/gems/rack-1.4.0/lib/rack/cascade.rb: in each
@apps.each do |app|...
/usr/local/sproutcore/bundle/ruby/1.9.1/gems/rack-1.4.0/lib/rack/cascade.rb: in call
@apps.each do |app|...
/usr/local/sproutcore/bundle/ruby/1.9.1/gems/rack-1.4.0/lib/rack/showexceptions.rb: in call
@app.call(env)...
/usr/local/sproutcore/bundle/ruby/1.9.1/gems/rack-1.4.0/lib/rack/recursive.rb: in _call
@app.call(env.merge('rack.recursive.include' => method(:include)))...
/usr/local/sproutcore/bundle/ruby/1.9.1/gems/rack-1.4.0/lib/rack/recursive.rb: in call
dup._call(env)...
/usr/local/sproutcore/bundle/ruby/1.9.1/gems/rack-1.4.0/lib/rack/conditionalget.rb: in call
status, headers, body = @app.call(env)...
/usr/local/sproutcore/lib/sproutcore/rack/restrict_ip.rb: in call
return @app.call(env)...
/usr/local/sproutcore/lib/sproutcore/rack/service.rb: in call
def call(env); @app.call(env); end...
/usr/local/sproutcore/bundle/ruby/1.9.1/gems/thin-1.2.11/lib/thin/connection.rb: in block in pre_process
response = @app.call(@request.env)...
/usr/local/sproutcore/bundle/ruby/1.9.1/gems/thin-1.2.11/lib/thin/connection.rb: in catch
catch(:async) do...
/usr/local/sproutcore/bundle/ruby/1.9.1/gems/thin-1.2.11/lib/thin/connection.rb: in pre_process
catch(:async) do...
/usr/local/sproutcore/bundle/ruby/1.9.1/gems/thin-1.2.11/lib/thin/connection.rb: in process
post_process(pre_process)...
/usr/local/sproutcore/bundle/ruby/1.9.1/gems/thin-1.2.11/lib/thin/connection.rb: in receive_data
process if @request.parse(data)...
/usr/local/sproutcore/bundle/ruby/1.9.1/gems/eventmachine-1.0.0.beta.4/lib/eventmachine.rb: in run_machine
run_machine...
/usr/local/sproutcore/bundle/ruby/1.9.1/gems/eventmachine-1.0.0.beta.4/lib/eventmachine.rb: in run
run_machine...
/usr/local/sproutcore/bundle/ruby/1.9.1/gems/thin-1.2.11/lib/thin/backends/base.rb: in start
EventMachine.run(&starter)...
/usr/local/sproutcore/bundle/ruby/1.9.1/gems/thin-1.2.11/lib/thin/server.rb: in start
@backend.start...
/usr/local/sproutcore/bundle/ruby/1.9.1/gems/rack-1.4.0/lib/rack/handler/thin.rb: in run
server.start...
/usr/local/sproutcore/lib/sproutcore/rack/service.rb: in start
server.run app, opts...
/usr/local/sproutcore/lib/sproutcore/tools/server.rb: in server
SC::Rack::Service.start(options.merge(:project => project))...
/usr/local/sproutcore/bundle/ruby/1.9.1/gems/thor-0.14.6/lib/thor/task.rb: in run
instance.send(name, *args) : instance.class.handle_no_task_error(name)...
/usr/local/sproutcore/bundle/ruby/1.9.1/gems/thor-0.14.6/lib/thor/invocation.rb: in invoke_task
task.run(self, *args)...
/usr/local/sproutcore/bundle/ruby/1.9.1/gems/thor-0.14.6/lib/thor.rb: in dispatch
new(args, opts, config).invoke_task(task, trailing || [])...
/usr/local/sproutcore/bundle/ruby/1.9.1/gems/thor-0.14.6/lib/thor/base.rb: in start
dispatch(nil, given_args.dup, nil, config)...
/usr/local/sproutcore/lib/sproutcore/tools.rb: in start
super(args)...
/usr/local/sproutcore/lib/sproutcore/tools.rb: in invoke
start([task_name.to_s] + ARGV)...
/usr/bin/sc-server: in <main>
SC::Tools.invoke 'server'...
Request information

GET
No GET data.
POST
No POST data.
COOKIES
No cookie data.
Rack ENV
Variable Value
GATEWAY_INTERFACE
CGI/1.2
HTTP_ACCEPT
text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
HTTP_ACCEPT_CHARSET
ISO-8859-1,utf-8;q=0.7,*;q=0.3
HTTP_ACCEPT_ENCODING
gzip,deflate,sdch
HTTP_ACCEPT_LANGUAGE
en-US,en;q=0.8
HTTP_CONNECTION
keep-alive
HTTP_HOST
localhost:4020
HTTP_USER_AGENT
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_2) AppleWebKit/535.7 (KHTML, like Gecko) Chrome/16.0.912.77 Safari/535.7
HTTP_VERSION
HTTP/1.1
PATH_INFO
/todos
QUERY_STRING
REMOTE_ADDR
127.0.0.1
REQUEST_METHOD
GET
REQUEST_PATH
/todos
REQUEST_URI
/todos
SCRIPT_NAME
SERVER_NAME
localhost
SERVER_PORT
4020
SERVER_PROTOCOL
HTTP/1.1
SERVER_SOFTWARE
thin 1.2.11 codename Bat-Shit Crazy
async.callback
#<Method: Thin::Connection#post_process>
async.close
#<EventMachine::DefaultDeferrable:0x00000100d35df0>
rack.errors
#<IO:<STDERR>>
rack.input
#<StringIO:0x00000100d38aa0>
rack.multiprocess
false
rack.multithread
false
rack.recursive.include
#<Method: Rack::Recursive#include>
rack.request.cookie_hash
{}
rack.request.query_hash
{}
rack.request.query_string
rack.run_once
false
rack.url_scheme
http
rack.version
[1, 0]
You're seeing this error because you use Rack::ShowExceptions.

最佳答案

只需按照高级安装:
http://sproutcore.com/install_mac/#tab=advanced-install
它会修复它。
如果您没有 git(高级安装的第 1 点),则不推荐使用第三行。使用 "bash -s stable < <(curl -s https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer )
"而不是 "./rvm-installer --version latest"。

关于sproutcore - 入门教程错误 : uncaught throw "Cannot file target sproutcore for entry lib/index.rhtml",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9013629/

31 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com