读书人

搭建环境及其遇到的有关问题

发布时间: 2012-12-25 16:18:28 作者: rapoo

搭建环境及其遇到的问题
搭建环境:

Installation on Ubuntu 10.04 :Installation Steps:1.Setting up the Rails development environmentRuby, rubygems, rails and other required packages can be installed by :"sudo apt-get install rails"2.Setting up MySQL serverFedena uses mysql, so run,"sudo apt-get install mysql-server mysql-client libmysql-ruby"Do remember the mysql password you set during this step, it is required in step five.3.Download the latest Fedena source code from githubDownload Fedena source code from GitHub. Extract the downloaded .tar archive to a convenient location where you would be running fedena . Let us say we extracted it to a directory named fedena in my home(~) directory.4.Install Rails version 2.3.5Fedena runs on version 2.3.5 of rails, so open a terminal and run,"sudo gem install rails -v=2.3.5"5.Setup your database details in the database.ymlOpen the file database.yml in the config folder of the fedena soucre. Change the following details:database: fedena - The name of the database you want to use for fedenausername: root - Mysql username for fedenapassword: mypass - The password for the above mysql user6.Install the prawn gemRun "sudo gem install prawn -v=0.6.3"7.Install the rest of the gemsOpen a terminal and navigate to the fedena source directory, install the rest of the gems by running"sudo rake gems:install"8.Set up Fedena databasesFrom the Fedena source directory in terminal run, "rake db:create" followed by, "rake db:migrate"9.Change permissions for scriptsFrom the same directory grant executable permissions for the files in script directory by,"chmod +x script/*"10.Run the inbuilt serverIf everything went fine till now, you are ready to run fedena server by running the following from fedena source folder,"script/server"Fedena Configurations :1. To enable SMS Modulei) Add a new row with config_key = "AvailableModules" and config_value = "SMS" (without quotes,case-sensitive) to `configurations` Tableii) Update the SMS API settings in lib/sms_manager.rb to use the SMS Module.2. To disable HR module, delete the row with config_key = "AvailableModules" and config_value = "HR"3. To disable Finance module, delete the row with config_key = "AvailableModules" and config_value = "Finance" 



设置git:

http://help.github.com/linux-set-up-git/

当下载github上的资源时,报错:
Agent admitted failure to sign using the key.Permission denied (publickey).


那么执行,ssh-add ~/.ssh/id_rsa
再ssh git@github.com提示连接成功就可以 clone了

vim安装 有问题,如何删除?
sudo apt-get remove vim

vim设置
1、使用cd / 转到文件系统中;


2、cd/etc/vim 切换到vim目录内;


3、修改文件权限 : sudo chmod 777 vimrc ,会提示你输入密码,输入密码即可;


4、vim vimrc 打开vim文件,添加以下内容:

""""""""""""""""""""""""""""""""""""""" 文件设置""""""""""""""""""""""""""""""""""""""set encoding=utf-8set fileencoding=chineseset fileencodings=ucs-bom,utf-8,chineseset ambiwidth=double


sudo gem install rubygems-update-1.4.1.gem
rm -r .vim/plugin/ScreenShot.vim
vim .vim
gedit.vimrc
make CFLAGS="-O2 -D_FORTIFY_SOURCE=1"
./configure --enable-multibyte --enable-rubyinterp
sudo make CFLAGS="-O2 -D_FORTIFY_SOURCE=1"
sudo apt-get install vim-nox

sudo apt-get install mercurial
hg clone https://vim.googlecode.com/hg/ vim
./configure --enable-rubyinterp

sudo apt-get remover mysql-server mysql-client libmysqlclient15-de


读书人网 >编程

热点推荐