ruby – RedCloth打破了我的Rails 3博客
发布时间:2020-12-17 03:20:40 所属栏目:百科 来源:网络整理
导读:像纺织这样的帖子感觉非常必要,但这给了我各种令人头疼的问题. bundle package和bundle install都运行正常,并确认RedCloth设置为最新的稳定版本(4.2.2).现在我在 ruby 1.9.2p0和rails 3.0.7上. 但是,当我尝试运行本地服务器时,我看到: LoadError in PostsCo
像纺织这样的帖子感觉非常必要,但这给了我各种令人头疼的问题. bundle package和bundle install都运行正常,并确认RedCloth设置为最新的稳定版本(4.2.2).现在我在
ruby 1.9.2p0和rails 3.0.7上.
但是,当我尝试运行本地服务器时,我看到: LoadError in PostsController#index no such file to load -- RedCloth ... app/controllers/posts_controller.rb:1:in `<top (required)>' This error occurred while loading the following files: RedCloth posts_controller中的第1行需要’RedCloth’.除了添加json格式和私有身份验证方法之外,我没有对基本的Rails脚手架进行任何其他更改,这两种方法都不应该影响这一点. 我正在使用部分来渲染我的帖子.它目前看起来像这样: <% div_for post do %> <h2><%= link_to_unless_current h(post.title),post %> </h2> <%= RedCloth.new(post.body).to_html %> <% end %> 的Gemfile: source 'http://rubygems.org' gem 'rails','3.0.7' gem 'sqlite3' gem 'rake-compiler' gem 'RedCloth' group :development,:test do gem 'webrat' gem 'rspec' gem 'rspec-rails' end (rake-compiler是试图遵循这些指令,btw:http://www.ruby-forum.com/topic/484752 [我用ruby 1.9.1和1.9.2尝试过,没有骰子,否则我不会在这里]) TIA (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |