摘要: 转自 http://segmentfault.com/a/1190000002911605https://ruby-china.org/topics/16245运行 RAILS_ENV=production bundle exec rake assets:precompile使用passenger在... 阅读全文
posted @ 2015-09-23 14:31 梅西爸爸 阅读(1628) 评论(0) 推荐(0) 编辑
摘要: find . -name *.png | xargs rm -fr 阅读全文
posted @ 2015-09-23 12:58 梅西爸爸 阅读(114) 评论(0) 推荐(0) 编辑
摘要: 7down voteaccepted gem install rack-corsOr in your Gemfile:gem 'rack-cors', :require => 'rack/cors'修改 config.rurequire ::File.expand_path('../config/e... 阅读全文
posted @ 2015-09-16 16:28 梅西爸爸 阅读(281) 评论(0) 推荐(0) 编辑
摘要: From Ruby array to JS array in Rails- 'quote'? 阅读全文
posted @ 2015-09-09 11:51 梅西爸爸 阅读(128) 评论(0) 推荐(0) 编辑
摘要: 方法1,在rubymine下查找所有css,scss,sass,less,修改所有带font-family的内容,删除public文件夹下面的缓存css,查看效果.如body { background-color: #fff; color: #333; font-family: "Micros... 阅读全文
posted @ 2015-08-10 05:49 梅西爸爸 阅读(217) 评论(0) 推荐(0) 编辑
摘要: http://blog.csdn.net/chunyang_guo/article/details/12779765有对应Model的时候用form_for,没有就用form_tag,比如搜索框一般没有对应Model。OldPasswordNewPasswordPasswordConfirm 阅读全文
posted @ 2015-08-07 07:41 梅西爸爸 阅读(295) 评论(0) 推荐(0) 编辑
摘要: bundle install 老是中断,可以在gemfile里面把source换成taobao源,可以自动安装 阅读全文
posted @ 2015-08-05 16:01 梅西爸爸 阅读(753) 评论(0) 推荐(0) 编辑
摘要: 建表ActiveRecord::Schema.define do drop_table :hosts if table_exists? :hosts create_table :hosts do |table| table.column :name, :string end drop_... 阅读全文
posted @ 2015-07-31 20:43 梅西爸爸 阅读(223) 评论(0) 推荐(0) 编辑
摘要: 移动设备优先在 Bootstrap 2 中,我们对框架中的某些关键部分增加了对移动设备友好的样式。而在 Bootstrap 3 中,我们重写了整个框架,使其一开始就是对移动设备友好的。这次不是简单的增加一些可选的针对移动设备的样式,而是直接融合进了框架的内核中。也就是说,Bootstrap 是移动设... 阅读全文
posted @ 2015-07-28 16:01 梅西爸爸 阅读(3114) 评论(0) 推荐(0) 编辑
摘要: http://resources.arcgis.com/en/help/rest/apiref/config.html#jcrossOriginAccesshttp://enable-cors.org/server_iis7.html跨域问题:XMLHttpRequest cannot load h... 阅读全文
posted @ 2015-07-28 07:08 梅西爸爸 阅读(585) 评论(0) 推荐(0) 编辑
摘要: 重启后生效开启: chkconfig iptables on关闭: chkconfig iptables off 或者 /sbin/chkconfig --level 2345 iptables off2) 即时生效,重启后失效service 方式开启: service iptables start... 阅读全文
posted @ 2015-07-20 04:00 梅西爸爸 阅读(132) 评论(0) 推荐(0) 编辑
摘要: 修改的用户都以root为列。一、拥有原来的myql的root的密码;方法一:在mysql系统外,使用mysqladmin# mysqladmin -u root -p password "test123"Enter password: 【输入原来的密码】方法二:通过登录mysql系统,# mysql... 阅读全文
posted @ 2015-07-20 03:48 梅西爸爸 阅读(259) 评论(0) 推荐(0) 编辑
摘要: yum remove mysql mysql-server mysql-libs compat-mysql51rm -rf /var/lib/mysqlrm /etc/my.cnf查看是否还有mysql软件:rpm -qa|grep mysql有的话继续删除 阅读全文
posted @ 2015-07-20 03:43 梅西爸爸 阅读(117) 评论(0) 推荐(0) 编辑
摘要: CentOS6.2下面安装RVM+ruby+Rails (1)RVM官方网站应该是改版过一次, 使用Java代码 curl-Lhttps://get.rvm.io|bash-sstable下载并安装rvm稳定版本。不在使用bash < <(curl -s https://rvm.beginrescu... 阅读全文
posted @ 2015-07-17 15:13 梅西爸爸 阅读(288) 评论(0) 推荐(0) 编辑
摘要: http://www.bootcss.com/p/layoutit/ 阅读全文
posted @ 2015-07-04 22:29 梅西爸爸 阅读(224) 评论(0) 推荐(0) 编辑
摘要: https://github.com/mz121star/weixin-metro 阅读全文
posted @ 2015-07-04 22:28 梅西爸爸 阅读(114) 评论(0) 推荐(0) 编辑
摘要: rails g scaffold zzitem zid:integer lpname:text lnum:string fnum:string local:text area:float price:float selltime:datetime mapid:integer imgsrc:text ... 阅读全文
posted @ 2015-06-25 15:44 梅西爸爸 阅读(115) 评论(0) 推荐(0) 编辑
摘要: 1. 访问 rails i18n 插件的官方网站 ,查看信息http://guides.rubyonrails.org/i18n.html2. 在Gemfile 中加入 测试rails4.2.1不用安装这个gem也可以gem 'rails-i18n' 3. 使用bundle install 来安装4... 阅读全文
posted @ 2015-06-18 17:37 梅西爸爸 阅读(334) 评论(0) 推荐(0) 编辑
摘要: ror 学习笔记2在railsapp的config文件夹中新建unicorn.rb内容如下worker_processes2working_directory"/home/mage/boleht"listen"/tmp/unicorn.boleht.sock"listen19555, :tcp_no... 阅读全文
posted @ 2015-06-17 20:38 梅西爸爸 阅读(198) 评论(0) 推荐(0) 编辑
摘要: centOS安装openoffice的方法 分类: centOS 2012-06-15 10:24 2872人阅读 评论(0) 收藏 举报centos测试yum install openoffice.org-writeryum install openoffice.org-calcyum insta... 阅读全文
posted @ 2015-06-17 20:36 梅西爸爸 阅读(504) 评论(0) 推荐(0) 编辑
摘要: 登录首页 专栏 专家 热文青竹剑侠[原]rails kaminari bootstrap-kaminari-views certified2014-4-15阅读488 评论0 kaminari是一个基于范围和驱动的清洁的、强大的、可定制的并且复杂的现代Web应用程序框架和对象关系模型。它只... 阅读全文
posted @ 2015-06-16 14:06 梅西爸爸 阅读(187) 评论(0) 推荐(0) 编辑
摘要: jquery取radio单选按钮的值 $("input[name='items']:checked").val(); 另:判断radio是否选中并取得选中的值 如下所示: function checkradio(){ var item = $(":radio:checked"); var len=i... 阅读全文
posted @ 2015-06-12 19:06 梅西爸爸 阅读(122) 评论(0) 推荐(0) 编辑
摘要: bootstrap中的modal 模态弹出框不能放在 form_for里面,一弹出modal会自动submit掉form 阅读全文
posted @ 2015-06-12 18:20 梅西爸爸 阅读(582) 评论(0) 推荐(0) 编辑
摘要: du -sh 文件夹路径查看linux文件目录的大小和文件夹包含的文件数 统计总数大小 du -sh xmldb/ du -sm * | sort -n //统计当前目录大小 并安大小 排序 du -sk * | sort -n du -sk * | grep guojf //看一个人的大小 du ... 阅读全文
posted @ 2015-06-10 12:53 梅西爸爸 阅读(149) 评论(0) 推荐(0) 编辑
摘要: 在ror工程内 /app/assets/stylesheets/bootstrap_and_overrides.css.less内覆盖内容具体参数如下https://github.com/twbs/bootstrap/blob/master/less/variables.less 阅读全文
posted @ 2015-06-10 12:39 梅西爸爸 阅读(157) 评论(0) 推荐(0) 编辑
摘要: insert into boleht_development.`htprojects`(id,pname,`general`,imgsrc,whatwedo,howwedo,bp) select cid,cproject_use1,cproject_use4,imgsrc,what_we_do,ho... 阅读全文
posted @ 2015-06-05 17:12 梅西爸爸 阅读(171) 评论(0) 推荐(0) 编辑
摘要: find ./ -name "*.lok" // 查找文件find ./ -name "*.lok" |xargs rm -fr // 查找文件并删除 阅读全文
posted @ 2015-06-05 10:53 梅西爸爸 阅读(540) 评论(0) 推荐(0) 编辑
摘要: 1、gem install devise2、在gemfile中添加 gem 'devise'3、bundle install4、执行 rails generate devise:install5、配置config/environment/development.rb中,添加 config.actio... 阅读全文
posted @ 2015-06-04 06:49 梅西爸爸 阅读(207) 评论(0) 推荐(0) 编辑
摘要: CentOS设置服务开机自动启动【转】Posted on 2012-06-28 16:00 eastson 阅读(4999) 评论(0) 编辑 收藏CentOS安装好apache、mysql等服务器程序后,并没有设置成开机自动启动的,为避免重启后还要手动开启web等服务器,还是做下设置好,其实设置很... 阅读全文
posted @ 2015-05-28 10:10 梅西爸爸 阅读(115) 评论(0) 推荐(0) 编辑
摘要: It is a security feature introduced in the latest version of RVMhttps://github.com/wayneeseguin/rvm/releases/tag/1.26.0You just need to follow the ins... 阅读全文
posted @ 2015-05-28 09:20 梅西爸爸 阅读(2902) 评论(0) 推荐(0) 编辑
摘要: 转 http://blog.csdn.net/dingxy/article/details/4016383在登录Linux时要执行文件的过程如下:在刚登录Linux时,首先启动 /etc/profile 文件,然后再启动用户目录下的 ~/.bash_profile、 ~/.bash_login或 ~... 阅读全文
posted @ 2015-05-28 09:06 梅西爸爸 阅读(172) 评论(0) 推荐(0) 编辑