小编Joh*_*ohn的帖子

在Windows上启动Rails v4.1.0服务器的TZInfo :: DataSourceNotFound错误

我使用Ruby on Rails v4.1.0创建了一个新的应用程序.尝试在Windows上启动服务器或控制台时,我遇到以下错误:

$ rails server
Booting WEBrick
Rails 4.1.0 application starting in development on ....

Exiting
c:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/tzinfo-1.1.0/lib/tzinfo/data_source.rb:199:
in `rescue in create_default_data_source': 
No timezone data source could be found. To resolve this, either install 
TZInfo::Data (e.g. by running `gem install tzinfo-data`) or specify a zoneinfo 
directory using `TZInfo::DataSource.set(:zoneinfo, zoneinfo_path)`.
(TZInfo::DataSourceNotFound) 
from c:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/tzinfo-1.1.0/lib/tzinfo/data_source.rb:196:
in `create_default_data_source'
Run Code Online (Sandbox Code Playgroud)

我该如何解决这个错误?

ruby ruby-on-rails tzinfo ruby-on-rails-4.1

63
推荐指数
5
解决办法
4万
查看次数

亚马逊s3 Javascript-请求的资源上没有"Access-Control-Allow-Origin"标头

我试图通过以下方式上传我的文件:

console.log("not broken til here");
    scope.inputMemeIsFile=true;
    var bucket = new AWS.S3({params: {Bucket: 'townhall.images'}});
    file = image.file;
    console.log(file);

    var params = {Key: file.name, ContentType: file.type, Body: file};
      bucket.upload(params, function (err, data) {
        var result = err ? 'ERROR!' : 'UPLOADED.';
        console.log(result);
        console.log(err);
      });
Run Code Online (Sandbox Code Playgroud)

但是,我收到以下错误:

XMLHttpRequest cannot load https://s3.amazonaws.com/<BUCKETNAME>/favicon.jpg. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://127.0.0.1:5000' is therefore not allowed access.
Run Code Online (Sandbox Code Playgroud)

与proceedingError:Network Failure {message: "Network Failure", code: "NetworkingError", time: Tue Feb 17 2015 13:37:06 GMT-0500 (EST), region: …

javascript upload amazon-s3 cors

26
推荐指数
3
解决办法
3万
查看次数

Xcode错误:"_ main",引用自:主要可执行文件的隐式入口/开始

我收到以下错误,这似乎来自底层的事情与"_main".

Ld /Users/jianglin/Library/Developer/Xcode/DerivedData/TownHall_iPhone-bdlgipvgaapgjhglhromfvcubbxz/Build/Products/Debug-iphonesimulator/TownHall\ iPhone.app/TownHall\ iPhone normal i386
    cd "/Users/jianglin/Desktop/TownHall iPhone"
    export IPHONEOS_DEPLOYMENT_TARGET=8.1
    export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch i386 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator8.1.sdk -L/Users/jianglin/Library/Developer/Xcode/DerivedData/TownHall_iPhone-bdlgipvgaapgjhglhromfvcubbxz/Build/Products/Debug-iphonesimulator -F/Users/jianglin/Library/Developer/Xcode/DerivedData/TownHall_iPhone-bdlgipvgaapgjhglhromfvcubbxz/Build/Products/Debug-iphonesimulator -filelist /Users/jianglin/Library/Developer/Xcode/DerivedData/TownHall_iPhone-bdlgipvgaapgjhglhromfvcubbxz/Build/Intermediates/TownHall\ iPhone.build/Debug-iphonesimulator/TownHall\ iPhone.build/Objects-normal/i386/TownHall\ iPhone.LinkFileList -Xlinker -rpath -Xlinker @executable_path/Frameworks -Xlinker -objc_abi_version -Xlinker 2 -ObjC -lPods-AFNetworking -lPods-Masonry -lPods-SDWebImage -framework CoreGraphics -framework Foundation -framework ImageIO -framework MobileCoreServices -framework Security -framework SystemConfiguration -framework UIKit -fobjc-arc -fobjc-link-runtime -Xlinker -no_implicit_dylibs -mios-simulator-version-min=8.1 -lPods -Xlinker -dependency_info -Xlinker /Users/jianglin/Library/Developer/Xcode/DerivedData/TownHall_iPhone-bdlgipvgaapgjhglhromfvcubbxz/Build/Intermediates/TownHall\ iPhone.build/Debug-iphonesimulator/TownHall\ iPhone.build/Objects-normal/i386/TownHall\ iPhone_dependency_info.dat -o /Users/jianglin/Library/Developer/Xcode/DerivedData/TownHall_iPhone-bdlgipvgaapgjhglhromfvcubbxz/Build/Products/Debug-iphonesimulator/TownHall\ iPhone.app/TownHall\ iPhone

Undefined symbols for architecture i386:
  "_main", referenced from:
     implicit entry/start for …
Run Code Online (Sandbox Code Playgroud)

xcode clang ios

8
推荐指数
1
解决办法
2万
查看次数

无法获取令牌,错误:错误Domain = NSCocoaErrorDomain Code = 3000"找不到有效的'aps-environment'权限字符串用于应用程序"

已经有一段时间困在这个问题上了.试图运行以下行:

[application registerForRemoteNotifications];
Run Code Online (Sandbox Code Playgroud)

并得到错误

(via: - (void)application:(UIApplication*)application didFailToRegisterForRemoteNotificationsWithError:(NSError*)error
{
    NSLog(@"Failed to get token, error: %@", error);
})

2015-04-03 16:06:42.753 TownHall[696:169453] Failed to get token, error: Error Domain=NSCocoaErrorDomain Code=3000 "no valid 'aps-environment' entitlement string found for application" UserInfo=0x17426a1c0 {NSLocalizedDescription=no valid 'aps-environment' entitlement string found for application}

Tried some of the stuff with the following associated post http://stackoverflow.com/questions/10987102/how-to-fix-no-valid-aps-environment-entitlement-string-found-for-application but little luck. 
Run Code Online (Sandbox Code Playgroud)

这包括:1)重新创建配置文件2)重新创建ID并检查它是否匹配并启用推送3)清理和重建等4)创建新证书5)使用Xcode刷新>首选项>帐户>查看详细信息(选择您的帐户)

想知道是否有人有任何解决方案吗?

很高兴分享人们可能会发现解决此问题的任何其他信息.

非常感谢您的帮助!

notifications push-notification apple-push-notifications ios provisioning-profile

6
推荐指数
2
解决办法
7015
查看次数