有没有一种简单的方法来为Rails项目创建站点地图文件?特别是对于动态站点(例如Stack Overflow),应该有一种动态创建站点地图文件的方法.Ruby和/或Rails的方法是什么?
你会建议什么?那里有什么好的宝石吗?
我正在尝试设计一个HTML电子邮件,当它在移动设备上阅读时也应该看起来很好.我最大的问题是iPhone(iOS 4):它大多没有文档的"自动链接"功能真的让我感到困惑.
自动链接似乎出现了
有没有关于如何的文件
任何信息,提示或线索都非常感激,因为似乎没有任何信息.
我跑步时遇到奇怪的捆绑错误
bundle pack
Run Code Online (Sandbox Code Playgroud)
与bundler 0.9.12
有任何想法吗?(有关更好的格式化代码,请参阅pastie:http://pastie.org/881328 )
/opt/ruby-enterprise-1.8.7-2010.01/lib/ruby/site_ruby/1.8/rubygems/package/tar_input.rb:49:in `initialize': not in gzip format (Zlib::GzipFile::Error)
from /opt/ruby-enterprise-1.8.7-2010.01/lib/ruby/site_ruby/1.8/rubygems/package/tar_input.rb:49:in `new'
from /opt/ruby-enterprise-1.8.7-2010.01/lib/ruby/site_ruby/1.8/rubygems/package/tar_input.rb:49:in `initialize'
from /opt/ruby-enterprise-1.8.7-2010.01/lib/ruby/site_ruby/1.8/rubygems/package/tar_reader.rb:63:in `each'
from /opt/ruby-enterprise-1.8.7-2010.01/lib/ruby/site_ruby/1.8/rubygems/package/tar_reader.rb:54:in `loop'
from /opt/ruby-enterprise-1.8.7-2010.01/lib/ruby/site_ruby/1.8/rubygems/package/tar_reader.rb:54:in `each'
from /opt/ruby-enterprise-1.8.7-2010.01/lib/ruby/site_ruby/1.8/rubygems/package/tar_input.rb:32:in `initialize'
from /opt/ruby-enterprise-1.8.7-2010.01/lib/ruby/site_ruby/1.8/rubygems/package/tar_input.rb:17:in `new'
from /opt/ruby-enterprise-1.8.7-2010.01/lib/ruby/site_ruby/1.8/rubygems/package/tar_input.rb:17:in `open'
from /opt/ruby-enterprise-1.8.7-2010.01/lib/ruby/site_ruby/1.8/rubygems/package.rb:55:in `open'
from /opt/ruby-enterprise-1.8.7-2010.01/lib/ruby/site_ruby/1.8/rubygems/format.rb:63:in `from_io'
from /opt/ruby-enterprise-1.8.7-2010.01/lib/ruby/site_ruby/1.8/rubygems/format.rb:51:in `from_file_by_path'
from /opt/ruby-enterprise-1.8.7-2010.01/lib/ruby/site_ruby/1.8/rubygems/format.rb:50:in `open'
from /opt/ruby-enterprise-1.8.7-2010.01/lib/ruby/site_ruby/1.8/rubygems/format.rb:50:in `from_file_by_path'
from /opt/ruby-enterprise-1.8.7-2010.01/lib/ruby/gems/1.8/gems/bundler-0.9.12/lib/bundler/source.rb:115:in `specs'
from /opt/ruby-enterprise-1.8.7-2010.01/lib/ruby/gems/1.8/gems/bundler-0.9.12/lib/bundler/source.rb:114:in `each'
from /opt/ruby-enterprise-1.8.7-2010.01/lib/ruby/gems/1.8/gems/bundler-0.9.12/lib/bundler/source.rb:114:in `specs'
from /opt/ruby-enterprise-1.8.7-2010.01/lib/ruby/gems/1.8/gems/bundler-0.9.12/lib/bundler/index.rb:32:in `from_cached_specs'
from /opt/ruby-enterprise-1.8.7-2010.01/lib/ruby/gems/1.8/gems/bundler-0.9.12/lib/bundler/index.rb:23:in `application_cached_gems'
from /opt/ruby-enterprise-1.8.7-2010.01/lib/ruby/gems/1.8/gems/bundler-0.9.12/lib/bundler/index.rb:15:in `cached_gems'
from /opt/ruby-enterprise-1.8.7-2010.01/lib/ruby/gems/1.8/gems/bundler-0.9.12/lib/bundler/index.rb:5:in `build'
from /opt/ruby-enterprise-1.8.7-2010.01/lib/ruby/gems/1.8/gems/bundler-0.9.12/lib/bundler/index.rb:14:in `cached_gems'
from …Run Code Online (Sandbox Code Playgroud) 我目前正在编写一个从RSS源中提取新信息的应用程序,并且必须以特定频率更新这些RSS源.目前我只在用户请求提要时才提取,但我想将该行为更改为自动定期提取.
我正在编写一个与数据库交互的shellcript,并通过cron定期启动 - 但这需要大量的双重努力,所以我想知道"Rails Way"或"Ruby Way"是做什么的.我正在使用Ubuntu,Apache和Passenger.你能否提出一些甚至可能包含在应用程序中的更好的方法,这样我就可以轻松地将应用程序部署到另一台机器而无需与cron混合?
我正在尝试使用最新的phusion passenger 2.2.11和ruby-enterprise-1.8.7-2010.01部署rails3应用程序.我正在使用捆绑器,但乘客似乎无法找到.bundle目录.
错误信息:
git://github.com/rails/rails.git (at master) is not checked out. Please run `bundle install` (Bundler::PathError)
Run Code Online (Sandbox Code Playgroud)
我在哪里安装.bundle?我在哪里告诉乘客使用哪个捆绑包?任何提示?
谢谢!
我们使用ruby/rails和facebooker(iframe应用程序)构建了一个facebook应用程序,目前仍然使用FB.Canvas.setAutoResize,在某些情况下似乎失败了.使用来自facebook developer docs的示例(请参阅http://developers.facebook.com/docs/reference/javascript/).一旦你进入一个高于800px的页面,autoresize就会失败 - 所以说,只要画布变大,它就会起作用,而不是当它变小时.任何人都有线索或解决方法吗?
这是调整大小的代码片段
<div id="fb-root" style="width:1px;height:1px;position:absolute;"></div>
<script type="text/javascript">
window.fbAsyncInit = function() {
FB.init({appId: '126342024064822', status: true, cookie: true, xfbml: true});
FB.Canvas.setAutoResize(true,100);
};
(function() {
var e = document.createElement('script'); e.async = true;
e.src = document.location.protocol +
'//connect.facebook.net/en_US/all.js';
document.getElementById('fb-root').appendChild(e);
}());
</script>
Run Code Online (Sandbox Code Playgroud)
我非常感谢任何评论或提示,因为我现在已经超过一天了.
我正在开发5个不同的rails项目,还有一些重构(从旧的rails版本转移到2.3) - 从日志文件中提取错误信息的最佳方法是什么,所以我可以看到所有的折旧警告,运行时错误等等在,所以我可以努力改善代码库?
你可以推荐哪些服务或库,实际上有助于rails logfile解析?
我想创建在旧的OS X机器和当前版本上运行的Perl脚本.是否有列表或资源,我可以找到哪些Perl版本与较旧的Mac OS X版本(10.0到10.6)一起分发?
我试图在osx/leopard上的xcode 3.1.4中拖放工作.任何指针或提示,甚至可能是示例代码?我找不到任何东西,这真的很令人失望.我希望在主窗口上拖动文件时让界面响应.
我试图获得一个jquery幻灯片来显示来自flickr,淡入淡出和滚动的图像.一切正常,除了我真的需要延迟加载图像(只需按需加载图像).
我目前正在使用jquery.cross-slide(http://tobia.github.com/CrossSlide/),但不幸的是,tobia不再使用该插件,也不想回答问题.
我找到了一个jquery.cycle的例子,其中应用了图像延迟加载(请参阅http://malsup.com/jquery/cycle/add3.html)是否有任何机会将此功能侵入交叉幻灯片的来源或者是由于插件的架构,这是不可能的?请参阅此处的代码:https://github.com/tobia/CrossSlide/blob/master/jquery.cross-slide.js#L131