`
jn615
  • 浏览: 97638 次
  • 性别: Icon_minigender_1
  • 来自: 火星
社区版块
存档分类
最新评论
文章列表
使用LiveCD光盘启动电脑后进入光盘中的Ubuntu系统,打开终端。 sudo -i 先来找一找你的ubuntu10.04安装在那个分区,用: fdisk -l 之后会出来一张表,表中有你的分区信息,找到你安装Ubuntu的分区,如果你不确定的话就找id为83的。下面加入说你的Ubuntu安装在/dev/sda1 分区,则下面挂载原系统的根目录: mount /dev/sda1 /mnt 将/dev/sda1挂载到了/mnt下,当然你也可以选其他地方。这里注意,如果你有单独为/boot分区的话,要单独挂载一次 /boot,比如说 如果你原来的/boot挂载到/dev/sda12上了, ...
W: GPG error: http://ppa.launchpad.net natty Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 6AF0E1940624A220 gpg --keyserver keyserver.ubuntu.com --recv 0624A220 gpg --export --armor 0624A220 | sudo apt-key add -
项目中需要进行geo_code 刚开始用的是geokit的gem, 支持多个api, google和yahoo 但是没有bing的, 客户又要求使用bing的 没办法, 搜, geocoder(https://github.com/alexreisner/geocoder)中支持bing的, 但是从rails3良好支持, rails2 的分支中好像没提到,无奈项目又是rails2.3.8的, 所以我把geo_coder源码中的bing部分抠了下来 注: 先去bing申请api key  www.bingmapsportal.com require 'net/http' require ...
升级到ubuntu 11.10之后, 安装rabbitvcs, 安装官网上的安装方法总是报错 http://wiki.rabbitvcs.org/wiki/install/ubuntu? sudo apt-get install rabbitvcs-cli rabbitvcs-core rabbitvcs-gedit rabbitvcs-nautilus [sudo] password for star: Reading package lists... Done Building dependency tree       Reading state information... ...
1. 在使用 longtext 类型执行数据录入时,有时会抛出这个异常, 从字面理解就是当前包大小超过 mysql 系统设置的包大小无法执行操作。 2. 解释一下包大小这个东西:简单来说就是mysql把当前执行的mysql语句看作是一个包, 而对这个包大小的限制即是对当前mysql语句长度的限制。 3. 解决办法: (1)Linux 下:    进入服务器路径 /etc/mysql 找到 my.cnf 在里面的 mysqld 段中    找到 max_allowed_packet = 大小    修改到适当大小并保存,然后重新启动 mysql 服务器,即可。    如果没有这行就增加这行。 ...
undefined method `name' for "actionmailer":String (NoMethodError) 这会出现在rails2.3中, 如果你的gem版本比较高的话,我的是1.8.10的, 降级为1.6.2即可 gem update --system 1.6.2
新装的ubunut系统总是遇见 Ubuntu sudo Error:unable to resolve host 是因为可能修改了系统名 我把系统名从star-ubuntu改为ubuntu(/etc/hostname) 同时要把hosts中对应的star-ubuntu(/etc/hosts)改掉就行了
今天用rails3.1 生成一个新的项目, 遇到: Could not find a JavaScript runtime. See https://github.com/sstephenson/execjs for a list of available runtimes. (ExecJS::RuntimeUnavailable) google一下,在gem 中添加: gem 'execjs' gem 'therubyracer' 然后bundle install, 搞定
Rails           mysql           postgresql         sqlite binary         blob             bytea                 blobboolean       tinyint(1)     boolean             booleandate            date             date                  datedatetime     datetime      timestamp         datetimedecimal       de ...
  在android开发中, 如果使用localhost 或 127.0.0.1 来访问pc是不对的, 因为Android模拟器(simulator)把它自己作为了localhost,也就是说,代码中使用localhost或者127.0.0.1来访问,都是访问模拟器自己!    如果你想在模拟器上面访问你的电脑,那么就使用android内置的IP 10.0.2.2 吧,10.0.2.2 是模拟器设置的特定ip,是你的电脑的别名alias    记住,在模拟器上用10.0.2.2访问你的电脑本机。
今天在调试js的时候遇到一个错误:SCRIPT5007: Unable to get value of the property.... 但是仅在IE9上有这个错误,在IE8,chrome, FF上都是好的,后来google一下, 说因为有些库文件已经老了, 不适合IE9, 解决办法就是在head中加上: <!-- Enable IE8 Standards mode --> <meta http-equiv="X-UA-Compatible" content="IE=8" > 就是以IE8 的模式来运行即可 相关连接: ht ...
在compiz中瞎折腾一圈, 突然标题栏全部消失, 用 sudo  metacity -- replace可以先临时出来   后来搜了一下有人说 点击Compiz Fusion Icon上的 Reload Window Manager, 但是我点了还是没解决, 但是我点击了Select Window Manager 下的Metacity 就好了, 但这只适用于我, 不知道其他人这样可行否。    
  Linux压缩文件的读取 ·    *.Z       compress 程序压缩的档案; ·    *.bz2     bzip2 程序压缩的档案; ·    *.gz      gzip 程序压缩的档案; ·    *.tar     tar 程序打包的数据,并没有压缩过; ·    *.tar.gz  tar 程序打包的档案,其中并且经过 gzip 的压缩!
rails中在model设置验证,但有的地方又不需要验证, 可以通过一下方法跳过 保存好办, 直接save(false) 比如: user = User.new user.save(false) 但是update怎么办呢 没有update_attributes(false) 可以这样: user = User.first user.attributes = params[user] user.save(false)
我的Ubuntu 更新时出现如下错误: Could not initialize the package information An unresolvable problem occurred while initializing the package information. Please report this bug against the 'update-manager' package and include the following error message: 'E:Encountered a section with no Package: header, E:Pr ...
Global site tag (gtag.js) - Google Analytics