Code Monkey home page Code Monkey logo

elixir-china's Introduction

ElixirChina

Build Status

目前ElixirChina 网站部署在DigitalOcean上。如果要本地开发运行ElixirChina,请依次运行以下命令行指令。

$ cp config/dev.secret.exs.example config/dev.secret.exs
$ mix deps.get
$ mix ecto.create Repo
$ mix ecto.migrate Repo
$ mix phoenix.server

在浏览器输入 localhost:4000 就能访问网站啦。

贡献

如果你想为ElixirChina贡献代码,可以来Issue list完成那里的一个个issue,另一种方式就是实现下面想实现的功能板块中还没实现的功能。完成后请提交Pull request

任何贡献:小到修复错别字,大到修复严重的bug或者实现比较大的功能,都非常的欢迎。

❤️ 💚 💙 💛 💜

想实现的功能

  • 论坛基本功能

    • 发帖
    • 贴内评论
    • 用户注册
    • 用户登录
    • session验证
    • 用户管理自己发的贴
    • 任意用户的帖子汇总页面
  • UI设计

    • 主页帖子分页
    • css美化
    • 支持显示所有的Github Emoji
  • 论坛高级功能

    • 帖子分类
    • 添加用户积分
    • 帖子有回复时在消息中心提示
    • 支持Markdown编辑和显示
    • 点击回复评论能@某用户,并在被@的用户的消息中心提示
  • 管理功能

    • 添加管理员

elixir-china's People

Contributors

adamshen avatar belltoy avatar clarkyi avatar defipanda avatar defp avatar falood avatar h1u2i3 avatar hisea avatar kabie avatar liliang13 avatar lokyoung avatar mengqing avatar ming535 avatar ruchee avatar tony612 avatar vimrus 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  avatar  avatar  avatar

elixir-china's Issues

请问要在本地跑起来数据库要做那些配置?

直接允许会提示没有权限创建数据库。

➜ elixir-china git:(master) sudo mix ecto.create Repo
** (Mix.Error) The database for repo Repo couldn't be created, reason given: ERROR: permission denied to create database
.
(ecto) lib/mix/tasks/ecto.create.ex:32: Mix.Tasks.Ecto.Create.run/1
(mix) lib/mix/cli.ex:55: Mix.CLI.run_task/2
(elixir) lib/code.ex:316: Code.require_file/2

➜ elixir-china git:(master) sub .
➜ elixir-china git:(master)

Error el.exe is not path

I have error when compile with command mix ecto.create Repo

'cl.exe' is not recognized as an internal or external command, operable program or batch file. ERROR: compile failed while processing c:/Users/opami/Desktop/elixir-china/deps/bcrypt: rebar_abort ==> elixir_china ** (Mix) Could not compile dependency :bcrypt, "escript.exe "c:/Users/opami/.mix/rebar"" command failed. You can recompile this dependency with "mix deps.compile bcrypt", update it with "mix deps.update bcrypt" or clean it with "mix deps.clean bcrypt"
How to resolve this error? Thanks

评论无法更新

这个PR 0e00ba1 merge后,编辑的时候我们也用Lepture editor了。。。

那东西更新的值没设置对,一直提交的是老的值。。。

Markdown应该支持显示Emoticon

完成 @u2 的提议。

暂时我们只考虑现实显示Emoticon。

以后我们可以考虑用At.js来实现编辑的时候输入Emoticon字符能autocomplete和显示带emoticon的提示。

Compile error in `mix ecto.create Repo`

== Compilation error on file lib/phoenix/socket.ex ==
** (ArgumentError) Access is not a protocol, cannot derive Access for Phoenix.Socket
    (elixir) lib/protocol.ex:76: Protocol.assert_protocol!/2
    (elixir) lib/protocol.ex:591: Protocol.derive/5
    (stdlib) lists.erl:1336: :lists.foreach/2
    (elixir) lib/protocol.ex:579: Protocol.__derive__/3
    lib/phoenix/socket.ex:24: (module)

could not compile dependency :phoenix, "mix compile" failed. You can recompile this dependency with "mix deps.compile phoenix", update it with "mix deps.update phoenix" or clean it with "mix deps.clean phoenix"

Elixir version 1.1.1

erlang version: Erlang/OTP 17 [erts-6.3] [source] [64-bit] [smp:4:4] [async-threads:10] [hipe] [kernel-poll:false]

加个 Wiki 页面?

现在 navbar 挺空的,而且加个简单的页面作为 Wiki,可以引导大家去找到一些资料。以及一些实际的、**特色的问题,比如**的 Hex 源、如何找到一些线下组织(比如 Meetup、微信群、Slack 等信息)

when run mix elixir-china.run occur an error

▶ mix elixir-china.server
==> bcrypt (compile)
Compiling c_src/async_queue.c
In file included from c_src/async_queue.c:32:0:
c_src/async_queue.h:45:21: fatal error: erl_nif.h: No such file or directory
#include <erl_nif.h>
^
compilation terminated.
ERROR: compile failed while processing /home/qwerty/workspace/elixir-china/deps/bcrypt: rebar_abort
** (Mix) Could not compile dependency bcrypt, /home/qwerty/.mix/rebar command failed. If you want to recompile this dependency, please run: mix deps.compile bcrypt

加入更多的分类

比如“线下活动”,“OTP”,“Erlang”,“Phoenix”,“Hex”,甚至是其他的函数式语言或者并发能力强的语言等,具体可以再想想和讨论一下。

另外感觉 “学习资料” 有点宽泛,感觉现在大家更多是当“分享”在用

"mix ecto.create Repo"遇错,如何解决?

hi.

root@hb:~/elixir-china# mix ecto.create Repo
warning: variable "deps" does not exist and is being expanded to "deps()", please use parentheses to remove the ambiguity or change the variable name
mix.exs:12

warning: variable "description" does not exist and is being expanded to "description()", please use parentheses to remove the ambiguity or change the variable name
/root/elixir-china/deps/uuid/mix.exs:8

warning: variable "package" does not exist and is being expanded to "package()", please use parentheses to remove the ambiguity or change the variable name
/root/elixir-china/deps/uuid/mix.exs:9

warning: variable "deps" does not exist and is being expanded to "deps()", please use parentheses to remove the ambiguity or change the variable name
/root/elixir-china/deps/uuid/mix.exs:10

===> Compiling bcrypt
make: Entering directory '/root/elixir-china/deps/bcrypt/c_src'
cc bcrypt_port.c bcrypt.o blowfish.o -lpthread -o ../priv/bcrypt
cc: error: bcrypt.o: No such file or directory
cc: error: blowfish.o: No such file or directory
Makefile:4: recipe for target '../priv/bcrypt' failed
make: *** [../priv/bcrypt] Error 1
make: Leaving directory '/root/elixir-china/deps/bcrypt/c_src'
===> Hook for compile failed!

* (Mix) Could not compile dependency :bcrypt, "/root/.mix/rebar3 bare compile --paths "/root/elixir-china/_build/dev/lib//ebin"" command failed. You can recompile this dependency with "mix deps.compile bcrypt", update it with "mix deps.update bcrypt" or clean it with "mix deps.clean bcrypt"
root@hb:/elixir-china#
root@hb:
/elixir-china# mix deps.compile bcrypt
warning: variable "deps" does not exist and is being expanded to "deps()", please use parentheses to remove the ambiguity or change the variable name
mix.exs:12

warning: variable "description" does not exist and is being expanded to "description()", please use parentheses to remove the ambiguity or change the variable name
/root/elixir-china/deps/uuid/mix.exs:8

warning: variable "package" does not exist and is being expanded to "package()", please use parentheses to remove the ambiguity or change the variable name
/root/elixir-china/deps/uuid/mix.exs:9

warning: variable "deps" does not exist and is being expanded to "deps()", please use parentheses to remove the ambiguity or change the variable name
/root/elixir-china/deps/uuid/mix.exs:10

===> Compiling bcrypt
make: Entering directory '/root/elixir-china/deps/bcrypt/c_src'
cc bcrypt_port.c bcrypt.o blowfish.o -lpthread -o ../priv/bcrypt
cc: error: bcrypt.o: No such file or directory
cc: error: blowfish.o: No such file or directory
Makefile:4: recipe for target '../priv/bcrypt' failed
make: *** [../priv/bcrypt] Error 1
make: Leaving directory '/root/elixir-china/deps/bcrypt/c_src'
===> Hook for compile failed!

* (Mix) Could not compile dependency :bcrypt, "/root/.mix/rebar3 bare compile --paths "/root/elixir-china/_build/dev/lib//ebin"" command failed. You can recompile this dependency with "mix deps.compile bcrypt", update it with "mix deps.update bcrypt" or clean it with "mix deps.clean bcrypt"
root@hb:~/elixir-china#

帖子的更新描述过于有歧义

比如在主页有“jw2013 于 2015-1-6 15点23分 最后更新”,其实我们想说的是

“jw2013发的帖子 于 2015-1-6 15点23分 最后更新”

应该把所有项目里“xxx 于 2015-1-6 15点23分 最后更新”改为“xxx的帖子 于 2015-1-6 15点23分 最后更新”

登陆密码错误

刚才登录论坛,提示用户名不存在,随后添上用户名之后说密码错误。
最后想重新注册提示说邮箱已经占用……
请问怎么解决?

setup error ?

love your work!

i follow the install steps cause errors :

➜ elixir-china git:(master) mix ecto.migrate Repo

19:37:09.757 [error] GenServer #PID<0.192.0> terminating
** (stop) %Postgrex.Error{message: "tcp connect: connection refused - :econnrefused", postgres: nil}
Last message: nil
State: [password: :REDACTED, timeout: 5000, otp_app: :elixir_china, repo: ElixirChina.Repo, adapter: Ecto.Adapters.Postgres, database: "elixir_china", username: "postgres", hostname: "localhost", extensions: [{Ecto.Adapters.Postgres.DateTime, []}, {Postgrex.Extensions.JSON, [library: Poison]}], port: 5432]
** (exit) exited in: :gen_server.call(#PID<0.192.0>, {:query, #Reference<0.0.2.1982>, :infinity}, 5000)
    ** (EXIT) %Postgrex.Error{message: "tcp connect: connection refused - :econnrefused", postgres: nil}
    (postgrex) lib/postgrex/connection.ex:97: Postgrex.Connection.query/4
    (ecto) lib/ecto/adapters/postgres/connection.ex:31: Ecto.Adapters.Postgres.Connection.query/4
    (ecto) lib/ecto/adapters/sql.ex:259: Ecto.Adapters.SQL.query/7
    (ecto) lib/ecto/pool.ex:159: Ecto.Pool.do_run/4
    (ecto) lib/ecto/adapters/sql.ex:247: Ecto.Adapters.SQL.query/6
    (ecto) lib/ecto/adapters/sql.ex:225: Ecto.Adapters.SQL.query/5
    (ecto) lib/ecto/adapters/sql.ex:183: Ecto.Adapters.SQL.query!/5
    (ecto) lib/ecto/adapters/postgres.ex:56: anonymous fn/4 in Ecto.Adapters.Postgres.execute_ddl/3
    (elixir) lib/enum.ex:1473: Enum."-reduce/3-lists^foldl/2-0-"/3
    (ecto) lib/ecto/adapters/postgres.ex:56: Ecto.Adapters.Postgres.execute_ddl/3
    (ecto) lib/ecto/migrator.ex:43: Ecto.Migrator.migrated_versions/2
    (ecto) lib/ecto/migrator.ex:142: Ecto.Migrator.run/4
    (ecto) lib/mix/tasks/ecto.migrate.ex:63: anonymous fn/4 in Mix.Tasks.Ecto.Migrate.run/2
    (elixir) lib/enum.ex:604: Enum."-each/2-lists^foreach/1-0-"/2
    (elixir) lib/enum.ex:604: Enum.each/2
    (mix) lib/mix/cli.ex:58: Mix.CLI.run_task/2
    (elixir) lib/code.ex:363: Code.require_file/2

/pages/unauthorized 需要支持DELETE

现在如果一个connection他的方法是DELETE,那么/pages/unauthorized会返回500 Internal Service Error.

ElixirChina.PageController 需要添加一个方法,效果是即使用户的请求是DELETE,也要执行

conn
    |> assign_layout(:none)
    |> render "unauthorized"

这个bug现在的表现直接体现在如果你想删除别人的帖子,虽然后端不让你删(是正确的),但是返回的是500 Internal Service Error. 正确的做法是返回401错误的信息,或者直接redirect到401错误的网页。

mix compile 错误

`== Compilation error on file web/router.ex ==
** (CompileError) web/router.ex: internal error in v3_core;
crash reason: {case_clause,
{'EXIT',
{badarg,
[{erl_anno,anno_info,[-1],[{file,"erl_anno.erl"},{line,360}]},
{v3_core,record_anno,2,[{file,"v3_core.erl"},{line,2410}]},
{v3_core,expr,2,[{file,"v3_core.erl"},{line,539}]},
{v3_core,safe,2,[{file,"v3_core.erl"},{line,1593}]},
{v3_core,expr,2,[{file,"v3_core.erl"},{line,528}]},
{v3_core,safe,2,[{file,"v3_core.erl"},{line,1593}]},
{v3_core,'-safe_list/2-anonymous-0-',2,
[{file,"v3_core.erl"},{line,1608}]},
{lists,foldr,3,[{file,"lists.erl"},{line,1276}]},
{v3_core,expr,2,[{file,"v3_core.erl"},{line,538}]},
{v3_core,safe,2,[{file,"v3_core.erl"},{line,1593}]},
{v3_core,'-safe_list/2-anonymous-0-',2,
[{file,"v3_core.erl"},{line,1608}]},
{lists,foldr,3,[{file,"lists.erl"},{line,1276}]},
{v3_core,expr,2,[{file,"v3_core.erl"},{line,538}]},
{v3_core,safe,2,[{file,"v3_core.erl"},{line,1593}]},
{v3_core,expr,2,[{file,"v3_core.erl"},{line,528}]},
{v3_core,safe,2,[{file,"v3_core.erl"},{line,1593}]},
{v3_core,'-safe_list/2-anonymous-0-',2,
[{file,"v3_core.erl"},{line,1608}]},
{lists,foldr,3,[{file,"lists.erl"},{line,1276}]},
{v3_core,expr,2,[{file,"v3_core.erl"},{line,652}]},
{v3_core,exprs,2,[{file,"v3_core.erl"},{line,512}]}]}}}

in function compile:'-select_passes/2-anonymous-2-'/2 (compile.erl, line 536)
in call from compile:'-internal_comp/4-anonymous-1-'/2 (compile.erl, line 321)
in call from compile:fold_comp/3 (compile.erl, line 347)
in call from compile:internal_comp/4 (compile.erl, line 331)
in call from compile:'-do_compile/2-anonymous-0-'/2 (compile.erl, line 179)
(stdlib) lists.erl:1338: :lists.foreach/2
(phoenix) expanding macro: Phoenix.Router.before_compile/1
web/router.ex:1: ElixirChina.Router (module)
(elixir) lib/kernel/parallel_compiler.ex:117: anonymous fn/4 in Kernel.ParallelCompiler.spawn_compilers/1`

看到这里
需要升级phoenix_html 版本,升级之后就是一片依赖的报警
【新手上路】所以暂时未解决该问题

文件log

elixir的logger目前只有内置console
需要配file log么
部署的时候 配下logrotate

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.