当前位置: 首页 > news >正文

鞋图相册网站怎么做营销型网站的盈利模式

鞋图相册网站怎么做,营销型网站的盈利模式,wordpress用户推广插件,旅游网站建设模块rvm是一个命令行工具#xff0c;可以提供一个便捷的多版本ruby环境的管理和切换。 https://rvm.io/ 如果你打算学习ruby/rails, rvm是必不可少的工具之一。 这里所有的命令都是再用户权限下操作的#xff0c;任何命令最好都不要用sudo. rvm安装 $ curl -L get.rvm.io | bash …rvm是一个命令行工具可以提供一个便捷的多版本ruby环境的管理和切换。 https://rvm.io/ 如果你打算学习ruby/rails, rvm是必不可少的工具之一。 这里所有的命令都是再用户权限下操作的任何命令最好都不要用sudo. rvm安装 $ curl -L get.rvm.io | bash -s stable $ source ~/.bashrc $ source ~/.bash_profile修改 RVM 的 Ruby 安装源到国内的 淘宝镜像服务器这样能提高安装速度 $ sed -i -e s/ftp\.ruby-lang\.org\/pub\/ruby/ruby\.taobao\.org\/mirrors\/ruby/g ~/.rvm/config/dbruby的安装与切换 列出已知的ruby版本 rvm list known安装一个ruby版本 rvm install 1.9.3这里安装了最新的1.9.3, rvm list known列表里面的都可以拿来安装。 使用一个ruby版本 rvm use 1.9.3如果想设置为默认版本可以这样 rvm use 1.9.3 --default 查询已经安装的ruby rvm list卸载一个已安装版本 rvm remove 1.9.2gemset的使用 rvm不仅可以提供一个多ruby版本共存的环境还可以根据项目管理不同的gemset. gemset可以理解为是一个独立的虚拟gem环境每一个gemset都是相互独立的。 比如你有两个项目一个是rails 2.3 一个是 rails 3. gemset可以帮你便捷的建立两套gem开发环境并且方便的切换。 gemset是附加在ruby语言版本下面的例如你用了1.9.2, 建立了一个叫rails3的gemset,当切换到1.8.7的时候rails3这个gemset并不存在。 建立gemset rvm use 1.8.7 rvm gemset create rails23然后可以设定已建立的gemset做为当前环境use 可以用来切换语言或者gemset,前提是他们已经被安装(或者建立)。并可以在list命令中看到。 rvm use 1.8.7 rvm use 1.8.7rails23然后所有安装的gem都是安装在这个gemset之下。 列出当前ruby的gemset rvm gemset list清空gemset中的gem如果你想清空一个gemset的所有gem,想重新安装所有gem可以这样 rvm gemset empty 1.8.7rails23删除一个gemset rvm gemset delete rails2-3项目自动加载gemset rvm还可以自动加载gemset. 例如我们有一个rails3.1.3项目需要1.9.3版本ruby.整个流程可以这样。 rvm install 1.9.3 rvm use 1.9.3 rvm gemset create rails313 rvm use 1.9.3rails313下面进入到项目目录建立一个.rvmrc文件。 在这个文件里可以很简单的加一个命令 rvm use 1.9.3rails313然后无论你当前ruby设置是什么cd到这个项目的时候rvm会帮你加载 ruby 1.9.3和rails313 gemset. 使用rvm来快速部署nginxpassenger *首先安装passenger gem install passenger然后使用passenger-install-nginx-module 来安装nginx和部署。 因为这一步需要root权限因为要编译nginx可以用rvmsudo这个东西。这个东西真是个好东西 rvmsudo passenger-install-nginx-module然后会让你选择是下载nginx源码自动编译安装还是自己选择nginx源码位置。 选择nginx手动安装的可以添加别的编译参数方便自定义编译nginx。 然后一路下载安装。默认的安装位置为/opt/nginx. 然后看看nginx.conf都给你配置好了只需要加上root位置yourapp/public就可以了。 当我第一次安装完成了就惊呼这也太爽了吧。 --------------------------------------------------------------------------------------------------------------------------------------------------------------------   RubyGems 镜像 - 淘宝网 为什么有这个 由于国内网络原因你懂的导致 rubygems.org 存放在 Amazon S3 上面的资源文件间歇性连接失败。所以你会与遇到 gem install rack 或 bundle install 的时候半天没有响应具体可以用 gem install rails -V来查看执行过程。 这是一个完整 rubygems.org 镜像你可以用此代替官方版本同步频率目前为15分钟一次以保证尽量与官方服务同步。 如何使用 $ gem sources --remove https://rubygems.org/ $ gem sources -a http://ruby.taobao.org/ $ gem sources -l *** CURRENT SOURCES ***http://ruby.taobao.org # 请确保只有 ruby.taobao.org $ gem install rails 如果你是用 Bundle (Rails 项目) source http://ruby.taobao.org/ gem rails, 3.2.12 ... Ruby 源代码下载 ruby-2.0.0-p247.tar.gzruby-1.9.3-p448.tar.gzruby-1.9.2-p320.tar.gzruby-1.8.7-p358.tar.gzRVM 改用本站作为下载源, 提高 Ruby 安装速度 For Mac $ sed -i .bak s!ftp.ruby-lang.org/pub/ruby!ruby.taobao.org/mirrors/ruby! $rvm_path/config/db For Linux $ sed -i s!ftp.ruby-lang.org/pub/ruby!ruby.taobao.org/mirrors/ruby! $rvm_path/config/db --------------------------------------------------------------------------------------------------------------------------------------------------------------------   https://github.com/saberma/vimfiles   介绍   这是经典的vim on rails开发工具 安装 请确保您已经安装了git-core,vim-7.2,ruby,rvm sudo apt-get install exuberant-ctags ncurses-term vim-noxgit clone git://github.com/saberma/vimfiles.git ~/.vim#初始化插件 cd ~/.vim git submodule init git submodule update ln -s ~/.vim/vimrc ~/.vimrccd ~/.vim/bundle/Command-T/ruby/command-t #一定要先切换回ruby1.8.7否则vim会报错:Vim: Caught deadly signal SEGV rvm system ruby extconf.rb make rvm default注意 最新版本的rails vimfiles已经不再使用fuzzy_finder实现快速打开文件的功能而改用CommandT其快捷键也由原来的ctrl t 改为 leader tleader键即\键 外部新增文件后CommandT列表中看不到时需要手动输入:CommandTFlush刷新缓存 升级 2011.08.19已升级至最新版本手动升级方法如下: cd ~/.vim git remote add akitaonrails git://github.com/akitaonrails/vimfiles.git git pull akitaonrails master git submodule foreach git pull参考资源 使用说明参考这里 以下为akitaonrails原版详细说明: Vim It is recommended that you use gVim in either Windows or Linux and MacVim forMac. Download from: (Windows) http://www.vim.org/download.php#pc (gvim73_46.exe)(Mac) https://github.com/b4winckler/macvim/downloads (snapshot-56)Bundled Plugins Ack – type :Ack [search pattern] to search your entire projectAlign – align blocks of text using equal sign, make comment boxes and morebufexplorer – manage your file buffersCommand-T – the fastest and most intuitive way for opening files in your projectcucumber – support for cucumber features such as syntax highlight, indentation, etcendwise – support to close Ruby blocks such as ‘if’, ‘do’ with ‘end’fugitive – support for Git, adding convenient commands such as :Gstatus, :Gread, :Gmovehaml – syntax highlight for HAMLhtml5.vim – omnicomplete function and syntax for HTML5markdown – syntax highlight for MarkdownNERD_commenter – support to comment lines of codeNERD_tree – project pane that you can open with [leader] pragtag – easier way to create tags for html, erb, etcrails – lot’s of tools to make it easier to manage your Rails projectssnipmate – support for textmate-like snippets for several languagessupertab – pseudo auto-complete with tabsurround – add, change, remove surrounding parentheses, brackets, quotes, etcsyntastic – checks for syntax errors in many languagestextile – syntax highlight for Textilevim-coffee-script – syntax highlight for Coffee Scriptvim-jade – Vim syntax highlighting for the Jade templating enginevim-jquery – Vim syntax file to add some colorations for jQuery keywords and css selectorsvim-preview – [leader] P previews Markdown, Rdoc, Textile, html. Requires Ruby and other gems.vim-ruby-sinatra – syntax highlight for Sinatravim-ruby – syntax highlight, smart identation, auto-complete for Rubyvim-textobj-rubyblock – smart block selection in Ruby codevividchalk – color scheme inspired by the classic Vibrant for TextmateZencoding – powerful way for HTML abbreviations (learn here: http://code.google.com/p/zen-coding/). Type abbreviation and press CtrlYcomma (c-y ,)Usage Troubleshoot: Because of the large amount of submodules, if you ever have anytrouble after pulling from the repository, it will be easier to just back upyour old .vim folder and just git clone a new version. Clone this repo into your home directory either as .vim (linux/mac) orvimfiles (Windows). Such as: git clone git://github.com/akitaonrails/vimfiles.git ~/.vimThen ‘cd’ into the repo and run this to get the snippets submodule: git submodule update --initNow you should create a new .vimrc file in your home directory thatloads the pre-configured one that comes bundled in this package. You can do iton Linux/Mac like this: echo source ~/.vim/vimrc ~/.vimrcOn Windows you should create a _vimrc (underline instead of dot) and addthe following line inside: source ~/vimfiles/vimrcThis way you can override the default configuration by adding your own insidethis file. You should also create a new .gvimrc file in your home directory. You can doit on Linux/Mac like this: echo source ~/.vim/gvimrc ~/.gvimrcOn Windows you should create a _gvimrc (underline instead of dot) and addthe following line inside: source ~/vimfiles/gvimrcThis way you can override the default GUI configuration by adding your own insidethis file. Help Tags At first usage of vim, type “:” while in command mode and execute: call pathogen#helptags() This will make the plugins documentations available upon :help Dependencies You will need these dependencies figured out: Ruby (for the fuzzy finder plugin)Exuberant Ctags (http://ctags.sourceforge.net/)Ncurses-term (in Linux only)In Ubuntu, for example, you will have to do: apt-get install exuberant-ctags ncurses-termIn OS X, you can install ctags with homebrew brew install ctagsOn Windows you have to download Ctags and add ctags.exe in your PATH. Mac OS X and most Linux distros come with Ruby already. If you’re in Windowslook for Luis Lavena’s latest Ruby Installer (http://rubyforge.org/projects/rubyinstaller/) IMPORTANT: Command-T The latest version replaces the old Fuzzy Finder with a new one called“Command-T” form wincent.com. I’ve replaced the old “Command-T” keybinding that used to open new tabs and assigned it to this new pluginso it behaves the same as Textmate. You may have problems in Mac/Linux because this plugin requires a nativeextension, so you will have to do this: rvm use system # use this line if using rvm cd ~/.vim/bundle/Command-T/ruby/command-t ruby extconf.rb makeThis means that you need to have your Ruby source files and GCC alsoinstalled. A binary for Windows is already bundled so it should justwork. I’ve also included a binary compiled for Ruby Enterprise Edition,but if you are using other Ruby distros, you will need to recompile. There are binaries for Mac and Windows. The Mac version is compiledagainst the default system Ruby for Mac OS X 10.6.5. The Windows versionis compiled against Ruby Installer 1.8.7-p330. Ubuntu 11.04 and/or Vim 7.3.35 Ubuntu 11.04 comes bundled with Vim 7.3.35, which has “flaky” Ruby support.Even if you do everything right, you might see the following crashes whentrying to use Command-T: Vim: Caught deadly signal SEGV Vim: Finished.Segmentation faultIf this happens to you, update Vim to 7.3.154: hg clone https://vim.googlecode.com/hg/ ~/vim cd ~/vim hg update -C v7-3-154 ./configure --enable-rubyinterp make sudo make installMore details can be found here Learn Vim Visit the following sites to learn more about Vim: http://vimcasts.orgThere are many sites teaching Vim, if you know of any other that are easyto follow for newcomers, let me know. Credits Original project and most of the heavy lifting: scroolooseAll the cool plugins for Rails, Cucumber and more: timpopeGreat Command-T plugin by: WincentHacks and some snippets: akitaonrails-------------------------------------------------------------------------------------------- Installing Prebuilt Binaries with RVM Originally posted 2012-12-21. Ive been working with a lot of virtual machines lately, and using RVM to install the version of ruby I need took longer than installing the base system. If you go through the motions of rvm install {VERSION}, you might just gloss over this message: No binary rubies available for: ubuntu/12.04/x86_64/{VERSION}. Continuing with compilation. Please read rvm mount to get more information on binary rubies. Not reading the documentation for rvm mount might end up costing you a lot of time. RVM Prepare RVM has a list of premade binaries that it will download if it gets the chance - you can see the list in/usr/local/rvm/config/remote or on github (I used a system-wide RVM install for this. Your path may be ~/.rvm/config/remote). For binaries that dont exist in that list, theres the option of packaging your own. Ill be assuming that were building a 2.0.0-preview2 binary, using a server you can scp files to, which is also accessable at http://artifacts.corp/binaries/ rvm install 2.0.0-preview2 rvm prepare 2.0.0-preview2 --install -r artifacts.corp:/var/www/binaries/ The rvm prepare command should have made a file called ruby-2.0.0-preview2.tar.bz2 in your current directory, and output something like the following. --- upload: ssh artifacts.corp mkdir -p /var/www/binaries//ubuntu/12.04/x86_64/ scp ruby-2.0.0-preview2.tar.bz2 artifacts.corp:/var/www/binaries//ubuntu/12.04/x86_64/ruby-2.0.0-preview2.tar.bz2 RVM rightly cares quite a bit about the OS that the build will be installed on, and strongly recommends that you follow the naming convention seen in that output as a way to organize and name your builds. Once those commands are run and the file is uploaded, well be ready for the next time that we need to install 2.0.0-preview2 on this OS. RVM Mount There are two ways to download premade binaries - rvm install {name}, which uses the list of prebuilt binaries if possible, or rvm mount -r {URI}. The former works with data from configuration files, while the latter works using just command line parameters. Lets install our Ruby using mount first, since it takes fewer steps: rvm mount -r http://artifacts.corp/binaries//ubuntu/12.04/x86_64/ruby-2.0.0-preview2.tar.bz2 --verify-downloads 1 On the VM I tested this with, rvm mount takes 12 seconds, while rvm install takes 4 minutes. Of course, theres that verify-downloads flag and the lists of prebuilt binaries left to explain.. RVM Remote As mentioned above, RVM has a list of prebuilt binaries for different platforms that it can download. In addition to the file (on ubuntu) at /usr/local/rvm/config/remote, RVM will also use/usr/local/rvm/users/remote, if present. You can see the rubies that RVM can download as binaries for your system with rvm list remote # Rubies available for ubuntu/12.04/x86_64:rbx-2.0.0-rc1 ruby-1.9.3-p194 ruby-1.9.3-p286 ruby-1.9.3-p327 If we add the URL to our precompiled 2.0.0-preview2 binary to /usr/local/rvm/users/remote, it will show up in that list. root$ echo http://artifacts.corp/binaries//ubuntu/12.04/x86_64/ruby-2.0.0-preview2.tar.bz2 /usr/local/rvm/user/remote root$ rvm list remote # Rubies available for ubuntu/12.04/x86_64: rbx-2.0.0-rc1 ruby-1.9.3-p194 ruby-1.9.3-p286 ruby-1.9.3-p327 ruby-2.0.0-preview2 For this bit, there is every chance that I am missing, or misunderstanding, something. This may not be the best or right way to do things Even though it shows up in the remote list, we still have to tell RVM that our server is an acceptable place to download rubies from. We do this by adding it to another textfile. echo rvm_remote_server_urlhttp://artifacts.corp/ /usr/local/rvm/user/db Checksums At this point, if you try rvm install 2.0.0-preview2 you would get an error message about checksums not matchng. With RVMs mount we used the --verify-downloads flag, which saves checksums of the file we download after the fact. Using that same flag, rvm install 2.0.0-preview2 --verify-downloads 1, will download and install the package correctly. If however, you want to have RVM to use checksums to verify the download was successful, we can refer way back to the rest of the output from our rvm prepare command: --- rvm/config/md5: http://artifacts.corp/binaries/ruby-2.0.0-preview2.tar.bz2fdb22cbad861616f5e3b56f0e3d976be --- rvm/config/sha512: http://artifacts.corp/binaries/ruby-2.0.0-preview2.tar.bz2eb1972575cee09b0de59f39815b2f9992366cd6aaf3e32ab214d39b054029cf904260933e8b2fa101c7b5eb548d013e0e05c09d3e93dbc97a1ae55789d6a046b And add those lines to our user/* files echo http://artifacts.corp/binaries/ubuntu/12.04/x86_64/ruby-2.0.0-preview2.tar.bz2eb1972575cee09b0de59f39815b2f9992366cd6aaf3e32ab214d39b054029cf904260933e8b2fa101c7b5eb548d013e0e05c09d3e93dbc97a1ae55789d6a046b /usr/local/rvm/user/sha512 echo http://artifacts.corp/binaries/ubuntu/12.04/x86_64/ruby-2.0.0-preview2.tar.bz2fdb22cbad861616f5e3b56f0e3d976be /usr/local/rvm/user/md5 Now, rvm install 2.0.0-preview2 will download a prebuilt binary from a server of your choosing, as well as verify that the checksum is the same as the package you built at the very beginning. Phew.转载于:https://www.cnblogs.com/code-changeworld/p/4775899.html
http://wiki.neutronadmin.com/news/179354/

相关文章:

  • 孝感网站开发优搏好免费微信快速开发平台
  • 网站运营和维护都是干什么的外贸英文网站搭建的公司
  • 企业营销网站建设公司哪家好wordpress汉字注册
  • 南阳建网站公司做网站如何保证询盘数量
  • 360网站建设服务深圳高端女装品牌排行榜
  • 广东省建设教育协会官方网站python做网站模板
  • 珍岛做网站怎么样公司注册网上核名一直提交不成功
  • 网站开发小公司推荐深圳有什么网站
  • 蓝色系 网站建设部城市管理监督局网站官网
  • 合肥网站建设哪个公司做得比较好网站标题栏怎么做
  • 盐山网站制作网站注册实名制怎么做
  • 山西seo网站设计文字创意logo设计
  • 怎么做自己的网站自建一个页面手工制作礼品盒
  • 炒股网站怎么做saas平台是干嘛的
  • 如何发布一个自己的网站扬州网络优化推广
  • 网站开发课程培训建设电商网站需要多少钱
  • 织梦手机网站图片网易云wordpress代码
  • 如何建设一个门户网站企业域名免费申请
  • 大连哪里做网站好怎么做网站搜索框搜索
  • 将自己做的网站入到阿里云域名上新华舆情监测平台
  • 网站开发需要多少人小程序模板免费制作
  • 广州网站建设信科便宜百度商桥怎么添加到网站
  • 建立个人网站要钱吗活动拍摄
  • 哪个网站专题做的好网站建设安全协议
  • 做网站文字字号大小网站开发架构师
  • 玉溪做网站网页美工设计之中使用的主要软件是
  • 大连网站设计 仟亿科技阿里巴巴做网站接单几率
  • 安徽专业网站建设设计达州注册公司
  • wordpress怎么自动更新网站地图软件商店哪个好用
  • 学前端什么网站好本地做网站绑定域名