GithubHelp home page GithubHelp logo

rails-engine / homeland Goto Github PK

View Code? Open in Web Editor NEW
317.0 317.0 57.0 13.53 MB

Community Rails Engine

Home Page: https://homeland-app.herokuapp.com/homeland

License: MIT License

Ruby 77.16% CoffeeScript 0.68% CSS 3.18% JavaScript 4.75% HTML 14.24%

homeland's People

Contributors

eric-guo avatar huacnlee avatar ifduyue avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

homeland's Issues

安装失败

安装第一步,bundle install 时报 [!] There was an error parsing Gemfile: You cannot specify the same gem twice coming from different sources. You specified that homeland (>= 0) should come from source at . and . Bundler cannot continue.
我尝试在gemfile里去掉gemspec后可以bundle install。
但执行rails g homeland:install 时说cannot find gem railties 。感觉还是第一步不能去掉gemspec,但不去掉就不能在gemfile里加homeland。

controllers/application_controller.rb 发生一个错误

module Homeland
class ApplicationController < ::ApplicationController
helper Homeland::ActionView::WillPaginate
helper Homeland::ApplicationHelper
end

class ApplicationController < ::ApplicationController
::之前是否没写完 ,

给我的报错是:Circular dependency detected while autoloading constant ApplicationController

上传图片如果文件名是中文时会出现错误

Started POST "/photos?tiny=1" for 125.69.59.41 at 2010-09-13 21:20:30 +0800
Processing by PhotosController#create as HTML
Parameters: {"utf8"=>"✓", "authenticity_token"=>"8JXDdsC2IfMrz3rEJh1UMgEiHfETDDzVyBN64eh6oDE=", "image2"=>#File:/tmp/RackMultipart20100913-24448-ccpj96, "tiny"=>"1"}
[paperclip] identify -format %wx%h '/tmp/stream,24448,1.png[0]'
[paperclip] convert '/tmp/stream,24448,1.png[0]' -resize "100>" '/tmp/stream,24448,1,24448,0'
[paperclip] identify -format %wx%h '/tmp/stream,24448,1.png[0]'
[paperclip] convert '/tmp/stream,24448,1.png[0]' -resize "680>" '/tmp/stream,24448,1,24448,1'
Completed in 1268ms

Encoding::CompatibilityError (incompatible character encodings: ASCII-8BIT and UTF-8):
app/controllers/photos_controller.rb:63:in block in create' app/controllers/photos_controller.rb:60:ineach'
app/controllers/photos_controller.rb:60:in `create'

在新建项目里无法显示帖子数?

环境:
rails 3.2.6
devise 2.1.2
mongoid 3.0.0.rc
个人稍微调整了路由 mount Homeland::Engine, :at => "/bbs" ,:as => "bbs"
数据库已经连接成功,然后报错
can't convert Fixnum into String
Extracted source (around line #43):

40:


41:

统计信息


42:

    43:
  • 贴子数: <%= Homeland::Topic.count %> 篇

  • 44:
  • 回贴数: <%= Homeland::Reply.count %> 条

  • 45:

46:

个人加上.to_s仍然没有效果

投票功能,并加入 Reddit 的排序方式

(p – 1) / (t + 2)^1.5

其中,
1)p 表示文章得到的投票数,之所以要使用 (p – 1),应该是想去掉文章提交者的那一票。
2)(t + 2)^1.5, 这个是时间因子。t 表示当前时间与文章提交时间间隔的小时数。但为什么要加 2 之后再取 1.5 的幂,似乎就没什么道理可言了,也许是个 trial-and-error 的结果吧。

Translation..

This looks very interesting to me. Is there any plan to translate the readme etc into English?

thanks,

J.

mongoid 3.0.0.rc下报mongoid index语法错误

我的环境:
mongoid: 3.0.0.rc
报错如下:
Problem:
Invalid index specification on Homeland::Topic: replied_at, {}
Summary:
Indexes in Mongoid are defined as a hash of field name and direction/2d pairs, with a hash for any additional options.
Resolution:
Ensure that the index conforms to the correct syntax and has the correct options.

Valid options are:
background: true|false
drop_dups: true|false
name: 'index_name'
sparse: true|false
unique: true|false

Valid types are: 1, -1, '2d'

Example:
class Band
include Mongoid::Document
index({ name: 1, label: -1 }, { sparse: true })
index({ location: '2d' }, { background: true })
end
看样子应该是topic的index格式不对

执行rails g homeland:install出错

执行rails g homeland:install,提示

Error: Command 'homeland:install:migrations' not recognized

查看源码发现homeland用的是

rails homeland:install:migrations

改用

rake homeland:install:migrations

后成功

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.