rails 4 在development环境下测试发送邮件模板

2015-02-02
阅读 1 分钟
2.6k
首先生成一个mailer 然后配置模板 这个官方手册有。 这里拿devise的用户通知邮件测试: 在/test/mailers/previews/下面创建test文件: {代码...} 这里用了Devise::Mailer来渲染邮件模板 然后我们可以在 /app/views/devise/mailer/下面找到对应的三个模板 修改模板 然后访问路径 {代码...} 就可以看到unlock_instructions...

(转载)Mac下使用Web服务器性能/压力测试工具webbench、ab、siege

2015-01-16
阅读 1 分钟
36.6k
Web开发,少不了的就是压力测试,它是评估一个产品是否合格上线的基本标准,下面我们来一一剖析他们的使用方式。 测试前,前面先把系统的端口限制数改大,看看Mac下面的默认限制 {代码...} 2000多的fd数是很小的,我们把他改大,当然我测试过了,也只能开10000而已,Linux可以开6W多,所以: {代码...} 在用 ulimit -a ...

如何增加博客访问量

2015-01-16
阅读 1 分钟
9.7k
{代码...} 或者使用apache-utils ab: {代码...} 都可以

花几分钟用Socket.io写一个简单的你画我猜小应用

2015-01-16
阅读 4 分钟
169.6k
socket.io 是一个为nodejs开发的socket通讯用的lib 要使用 socket.io , 首先要安装nodejs , mac下面我直接用brew安装了(或者ports 以及 源码编译):

Rails利用Yaml在不同的环境与数据库之间传递数据

2015-01-15
阅读 2 分钟
107.2k
Sometimes, you cannot just seed your Rails database. This could be due to the complexity of the data itself, which may turn the creation of your seeds.rb file into a pure nightmare. In such cases, one of the possible solutions is to process all your data manually, through your web app UI, for exa...

Rails が production 環境で真っ白、SECRET_KEY_BASE 設定忘れが原因でした

2015-01-13
阅读 1 分钟
3.9k
production 環境で、なぜか Rails アプリケーションの画面が真っ白になってしまった。 — 環境 — Rails 4.1 Unicorn エラーログを確認 unicorn のエラーログを確認しますと… {代码...} production 用の secret_key_base が見つかりません、とエラーメッセージが出ていました。 production 環境の secret_key_base を設定 ...

Failed to build gem native extension

2015-01-09
阅读 1 分钟
2k
Unable to install gem - solution: {代码...} or {代码...}

Building a RESTful API in a Rails Application

2015-01-07
阅读 17 分钟
2.2k
There comes a time in the development lifecycle of most web applications when a third-party integration becomes necessary. One of the simplest ways to do so is to expose a REST API for consumption. This article will walk you through a possible approach to designing and implementing a REST API in ...

angularjs新手教程 factory利用callback传递参数的用法

2015-01-07
阅读 1 分钟
33.5k
在angularjs中 service/factory是与controller分开的另外一个概念 这时候 service/factory更像是model

Ruby on Rails: UUID as your ActiveRecord primary key

2015-01-05
阅读 2 分钟
2.4k
Sometimes, using the good old ‘auto increment’ from your database just isn’t good enough. If you really require that all your objects have unique ID, even across systems and different databases there’s only one way go: UUID or Universally Unique IDentifier.

Use SQLite Instead of Local Storage In Ionic Framework

2015-01-04
阅读 5 分钟
7.2k
Switching to object-based data storage can often be tough. If you’re trying to start Phonegap or Ionic Framework development and are coming from native development, the whole local storage concept can be a tough one to grasp. Or maybe you just prefer a structured query language (SQL) when working...

Rails 4 + angularjs CORS - 跨域实现的办法

2014-12-30
阅读 2 分钟
12.8k
在两台服务器之间实现angularjs app与rails的REST api通讯,一般会遇到CORS警告的报错。 CORS Cross-origin resource sharing 其实是一种浏览器技术,定义了服务器资源是否允许被另外一个域名下地服务器读取。

关于Rails性能调整

2014-12-27
阅读 13 分钟
2.8k
For something that is touted as being an “easy” to use framework, Rails is a pretty complex beast. Over the years it has progressed from a seemingly simple framework that “anyone” can learn to the intricate collection of add-ons, gems and extensions that make it the power house it is now.

rails4 关闭对assets的log显示

2014-12-27
阅读 1 分钟
2.8k
使用 {代码...} document:[链接]

关于rails性能的那些小事儿

2014-12-27
阅读 16 分钟
2.3k
I often hear that Rails is slow. This has become a common theme among the Ruby and Rails community. But it is actually a myth. It's easy to make your application up to 10x faster just by using Rails in the right way. Here's what you need to know to optimize your Rails application.

brew关联到环境变量

2014-12-07
阅读 1 分钟
2.3k
$ brew install openssl $ brew link openssl

mac os下使用mysql2报错: rake aborted!

2014-12-04
阅读 1 分钟
2.3k
信息 {代码...} 解决办法 console: {代码...}

Path in developing

2014-12-04
阅读 1 分钟
2.3k
Step by Step 1.Symfony 2.5.* 2.Rails 4.* 3.Meteor 1.* 4.Socket.io / Express.io 5.Angularjs / Backbone.js,underscore.js 6.HTTP protocol

MongoDB had an unspecified uncaught exception. 报错

2014-12-02
阅读 1 分钟
2.4k
{代码...} 在启动前type: {代码...}

Meteor模板中渲染日期格式

2014-12-02
阅读 1 分钟
2.5k
首先在client中定义format: {代码...} 然后添加UI.registerHelper {代码...} 最后更新一个moment.js {代码...} 最后我们在meteor模板中这样使用: {代码...}

使用stof & gedmo , Filter 'softdeleteable' is not enabled.

2014-11-28
阅读 1 分钟
2k
可能的原因是 entity发生了改变 ext_log_entries日志里呈现的序列化data不一样,解决办法就是清空ext_log_entries表的数据

解决Backbone(underscore) & EJS 冲突

2014-11-21
阅读 1 分钟
2.6k
{代码...} 加入这行代码即可

用forever来解决重复重启node服务器的问题

2014-11-20
阅读 2 分钟
3k
This is probably only applicable to beginners as I can only assume experienced users have already had this issue and quickly did what I have and found the solution. But for those of you who haven't then make sure to do this when developing your next Sails application.

《麦兜》:一碗荷包蛋方便面的人生哲理

2014-11-09
阅读 2 分钟
5.6k
有很多故事小时候看会笑到哭,长大后再看会哭到笑。如同每个人的生命进程,少年无忧患,青年忙奔波,中年愁儿女,老人等暮色,渐次从笑到哭或者从哭到笑,这一生不过一哭一笑间的光阴。

Introduction

2014-11-06
阅读 2 分钟
2k
I am a member of GembaChina's PD team , and have 2-3 years experiences in scripts programming , web application developments , and linux server's managements , my major in university is Petroleum Machinery , my favorite course is Java/PHP programming , and I do not like micrtsoft/adobe 's courses...

程序猿最应去的网站有哪些?

2014-09-24
阅读 1 分钟
2.7k
要想成为优秀的程序猿,不仅要有一定天分,常与大神交流,自己多加练习才是正确的方法。下面是一些Quora用户推荐的国外网站,与广大程序猿或者希望学习编程的朋友们分享:

解耦你的事件系统(基于事件驱动的设计、使用方式)

2014-08-30
阅读 5 分钟
4.2k
假定你正在创建一个可以复用的包.在这个包里面,你想用事件来构建和实现外部hook内部代码的功能.你会看到很多可以使用的事件管理器.当然你已经对 Symfony EventDispatcher component 有了某种程度的熟悉了,你决定把它加入到你包的composer.json文件中:

一个Symfony2开发必备的调试小工具 LadybugBundle

2014-08-21
阅读 2 分钟
4.5k
一目了然,因为一般在Symfony2中你不能直接var_dump一个组件实例或者一个doctrine的entity,如果开启dev模式底部的调试工具又太麻烦,用ladybug就可以了

Composer资源库

2014-08-21
阅读 9 分钟
4.4k
Composer 是一个依赖管理工具。它在本地安装一些资源包。一个包本质上就是一个包含东西的目录。通常情况下它存储 PHP 代码,但在理论上它可以是任何东西。并且它包含一个描述,其中有一个名称和一个版本号,这个名称和版本号用于识别该包。

composer.json 架构

2014-08-21
阅读 11 分钟
3.5k
我们有一个 JSON schema 格式化文档,它也可以被用来验证你的 composer.json 文件。事实上,它已经被 validate 命令所使用。 你可以在这里找到它: res/composer-schema.json.