windy / wblog Goto Github PK
View Code? Open in Web Editor NEWThe missing independent blog system for Ruby on Rails
Home Page: https://github.com/windy/wblog
The missing independent blog system for Ruby on Rails
Home Page: https://github.com/windy/wblog
1.首页只有一篇文章觉得怪怪的。
当我 第一次踏入这个blog时,看完了最新的文章想看其他文章,于是我点了很多次logo却还是只有一篇,错误的以为只有一篇文章。不过我也不知道怎么改比较好XD
2.建议顶部工具栏固定置顶或者鼠标放上后悬浮出。否则每次看完文章以后想切换栏目还要手动返回顶部打开抽屉切换。
3.搜索功能
cp config/database.yml.example config/database.yml
cp: config/database.yml.example: No such file or directory
考虑去掉 mongodb 的 id, 采用 friend_id 或者 google 的服务等.
rt
你好,我是一个rails初学者,非常喜欢您的博客,并想通过您的博客学习rails。
但是我在按照readme照做之后并启动之后出现了这样的错误
Puma caught this error: could not connect to server: Connection refused
Is the server running on host "localhost" (::1) and accepting
TCP/IP connections on port 5432?
could not connect to server: Connection refused
Is the server running on host "localhost" (127.0.0.1) and accepting
TCP/IP connections on port 5432?
(PG::ConnectionBad)
...(后面一大堆)
我通过 sudo netstat -an | grep 5432
发现并没有任何输出
请问这是什么原因?我应该如何做?
Hi Windy,
First of all I would like to thank for such nice and open source blogging system and that too in my favorite language 'Ruby'.
I was really looking for this one.
I setup wblog
locally and created few demo blogs etc.
I like the UI/UX of a blog post and commenting feature.
However, whenever user comment on the blog post, it directly display the comments at the bottom of the blog.
Wouldn't it be good to display those comments after blog owner review?
I am a RoR full stack developer like you 😄 and would like to contribute in making wblog
as ideal blogging platform.
Thanks
I, [2014-04-03T23:51:28.938434 #29138] INFO -- : Started POST "/blogs/533d38976c6934037a050000" for 58.60.171.103 at 2014-04-03 23:51:28 +0800
F, [2014-04-03T23:51:28.940646 #29138] FATAL -- :
ActionController::RoutingError (No route matches [POST] "/blogs/533d38976c6934037a050000")
development模式一切正常,production模式打开网页几乎变成了纯文本,美丽的ui全没了......
http:\sxysxy.org 最近发现运行吃内存太严重,想以production方式运行然后就RT.
刚接触 rails ,打算弄个博客开始折腾,今天用你这个程序在国内 coding.net 上面部署,出现问题了 We're sorry, but something went wrong.
它这个是一键部署的,不知道怎么配置数据库这些东西,不知道有没有时间看下怎么部署
评论增多之后, 通知邮件给所有人就不好了, 只发给 @ 的人就好了
在尝试使用新的mina部署框架。
wblog项目在服务器上首次部署,遇到一些问题。
一直部署下来,遇到的不少问题都是google解决掉了。
其中最坑的就是
-----> Installing gem dependencies using Bundler
$ mkdir -p "/home/deploy/web/wblog/shared/bundle"
$ mkdir -p "./vendor"
$ ln -s "/home/deploy/web/wblog/shared/bundle" "./vendor/bundle"
$ bundle install --without development:test --path "./vendor/bundle" --deployment
经常报错,然后终止。有好几个gem,都要手动去gem install xxx -v 'xxx'这样子。再执行mina deploy -v
。
现在unicorn启动报错,异常信息如下:
-----> Start Unicorn
$
cd /home/deploy/web/wblog/current && bundle exec unicorn -c config/unicorn/production.rb -E production -D
/home/deploy/web/wblog/releases/1/vendor/bundle/ruby/2.1.0/gems/unicorn-4.8.3/lib/unicorn/configurator.rb:75:in `read': No such file or directory @ rb_sysopen - config/unicorn/production.rb (Errno::ENOENT)
from /home/deploy/web/wblog/releases/1/vendor/bundle/ruby/2.1.0/gems/unicorn-4.8.3/lib/unicorn/configurator.rb:75:in `reload'
from /home/deploy/web/wblog/releases/1/vendor/bundle/ruby/2.1.0/gems/unicorn-4.8.3/lib/unicorn/configurator.rb:68:in `initialize'
from /home/deploy/web/wblog/releases/1/vendor/bundle/ruby/2.1.0/gems/unicorn-4.8.3/lib/unicorn/http_server.rb:100:in `new'
from /home/deploy/web/wblog/releases/1/vendor/bundle/ruby/2.1.0/gems/unicorn-4.8.3/lib/unicorn/http_server.rb:100:in `initialize'
from /home/deploy/web/wblog/releases/1/vendor/bundle/ruby/2.1.0/gems/unicorn-4.8.3/bin/unicorn:126:in `new'
from /home/deploy/web/wblog/releases/1/vendor/bundle/ruby/2.1.0/gems/unicorn-4.8.3/bin/unicorn:126:in `<top (required)>'
from /home/deploy/web/wblog/releases/1/vendor/bundle/ruby/2.1.0/bin/unicorn:23:in `load'
from /home/deploy/web/wblog/releases/1/vendor/bundle/ruby/2.1.0/bin/unicorn:23:in `<main>'
master failed to start, check stderr log for details
! ERROR: Deploy failed.
发现这跟你在deploy.rb中做的配置有关。
应该怎么解决呢?
wblog caiqinghua$ bundle install
Fetching source index from http://ruby.taobao.org/
Could not find activesupport-4.1.9 in any of the sources
例如第一篇文章已经删除了,地址栏输入进入/blogs/1,会进入rails报错界面(ActiveRecord::RecordNotFound),希望能优美地处理这个。(进入到一个比较漂亮的报错界面什么的)
修复之
Started POST "/admin/sessions?password=admin&username=admin" for 127.0.0.1 at 2014-06-08 21:24:43 +0800
Processing by Admin::SessionsController#create as JSON
Parameters: {"password"=>"admin", "username"=>"admin"}
Completed 200 OK in 1ms (Views: 0.2ms)
我没用过 angularjs,但无论什么技术,密码都不应该出现在日志里啊。并且还是明文 ...
使用 GIF 再截几个全图
我再调试一个问题的时候没有弄好,就重新从git上拉代码到服务器上 所以的 除了管理员账户没有配置 其他的都配置了 也可以运行 。这是配置文件
config/application.yml
`
| SITE_NAME: "Haley's Blog"
| # Admin Dashboard Management, If ADMIN_USER is blank, No One can login into Dashboard
| # Recommend using your personal Email, if SENDCLOUD_USER is setted, System WILL send you notification email.
| # For more detail, see: /app/models/comment.rb
| ADMIN_USER: 'mandy'
| ADMIN_PASSWORD: '*******'
|
|
| # Rails secret token, use rake secret
to generate new one here.
| SECRET_TOKEN: 'e4122773d4324fce978c52cde790d84d14f7194f377aea41b7b8302d1d10150e6076a3b7e5e0c1f24ca330cf0a058482c95e
|
| #locale: en or zh-CN, zh-CN is default value
| LOCALE: 'zh-CN'
|
| # sidekiq redis namespace, if you configure two blog in on VPS, you should change it.
| # default is wblog
| REDIS_NAMESPACE: 'wblog'
|
| # META description for SEO
| INTRODUCE: '一个缺口的被子,换个角度看它,它仍然是圆的'
|
| #Website Address for footer display without http
| # SITE_ADDRESS: 'yafeilee.me'
| #SITE_ADDRESS: 'yafeilee.me'
| #Website Year for footer display
| SITE_YEAR: '© 2017'
|
| # optional
| # google analytics, blank it if you don't need
| GOOGLE: ''
|
| # CDN ( optional )
| CDN: ''
|
| # Email Setting, see more: /config/environments/production.rb
| MAIL_SERVER: ''
| DOMAIN_NAME: ''
| MAIL_USERNAME: ''
| MAIL_PASSWORD: ''
`
然后我修改了一些,这是修改后的
不知道作者有没有试过同时运行两个项目。
我的 wblog 运行在 3000 端口
另一个项目运行在 3001 端口
http://localhost:3000/admin/ 登录后,跳转到了 3001/admin 。
相关文件 admin_sessions.js.coffee
题外话:Rails 默认是有点笨重,做减法确实轻快了,但同时也要悠着点啊。
执行部署任务时,出现如下的错误:
RAILS_ENV=production rake assets:precompile
rake aborted!
Sass::SyntaxError: Invalid CSS after "...ules: $modules ": expected "}", was "!global;"
(in /var/www/apps/wblog/app/assets/stylesheets/application.scss:13)
/usr/local/rvm/gems/ruby-2.1.5@blog/gems/foundation-rails-5.5.0.0/vendor/assets/stylesheets/foundation/_functions.scss:13
/var/www/apps/wblog/app/assets/stylesheets/foundation_and_overrides.scss:9
/var/www/apps/wblog/app/assets/stylesheets/application.scss:5
是不是那个foundatio版本的问题,我是完全沿用的项目中的Gemfile.lock
。
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.