`
sillycat
  • 浏览: 2542765 次
  • 性别: Icon_minigender_1
  • 来自: 成都
社区版块
存档分类
最新评论

buildr(1)Introduce and Install

 
阅读更多
buildr(1)Introduce and Install

1. Install on Linux
>wget http://buildr.apache.org/scripts/install-linux.sh
>sudo sh install-linux.sh

It told me that I need these things as follow:
No package ruby available.
No package rubygems available.
No package ruby-devel available.
No package gcc available.

Hard to believe that. So many things to do on redhat.

message:
This system is not registered with RHN.
RHN support will be disabled.
Setting up Install Process
No package httpd-devel available.
Nothing to do

solution:
>vi /etc/yum.conf
[main]
cachedir=/var/cache/yum
debuglevel=2
logfile=/var/log/yum.log
pkgpolicy=newest
distroverpkg=redhat-release
tolerant=1
exactarch=1

[base]
name=CentOS-$releasever – Base
baseurl=http://mirror.centos.org/centos/4/os/x86_64/
gpgcheck=1

[updates]
name=Red Hat Linux $releasever – Updates
baseurl=http://mirror.centos.org/centos/4/os/x86_64/
gpgcheck=1

>sudo yum clean all
>sudo yum update --skip-broken

Install gcc, git on my system.
>sudo yum install glibc-kernheaders --skip-broken

Some cycle dependency here.

try to prepare rvm and install ruby1.9.2, and install gem then.

2. Install on Ubuntu
Install ruby related things
>sudo apt-get install ruby-full ruby1.8-dev libopenssl-ruby build-essential

make sure I installed gem on my system
>gem --version
1.8.6

make sure JAVA is there on my system
>echo $JAVA_HOME
/usr/lib/jvm/java-6-sun

Install buildr
>sudo env JAVA_HOME=$JAVA_HOME gem install buildr

Other commands to upgrade a new version or install a specific version:
>sudo env JAVA_HOME=$JAVA_HOME gem update buildr
>sudo env JAVA_HOME=$JAVA_HOME gem install buildr -v 1.4.3

>sudo buildr test
error message:
RuntimeError : Are we forgetting something? JAVA_HOME not set.

solutions:
>sudo env JAVA_HOME=$JAVA_HOME buildr test

3. Install on windows
Install ruby tools on windows first http://rubyinstaller.org/downloads/archives, download the file with version 1.8.6
http://rubyforge.org/frs/download.php/71066/rubyinstaller-1.8.6-p398.exe

set JAVA_HOME

execute the install command
>gem install buildr --platform nswin32

error message:
'make' is not recognized as an internal or external command, operable program or batch file.

solution:
Install the DEVKIT, update your PATH to include build tools or download the DevKit
from 'http://rubyinstaller.org/downloads' and follow the instructions
at 'http://github.com/oneclick/rubyinstaller/wiki/Development-Kit'

Add this directory to path: D:\tool\devkit\bin

Fix this problem, but other problem accured. My windows system is 64bit win7.

error message:
jniwrap.h:24: error: 'long long long' is too long for GCC
jniwrap.h:24: error: 'long long long' is too long for GCC
jniwrap.h:24: warning: useless type name in empty declaration

Solutions:
try install MinGW via this URL http://sourceforge.net/projects/mingw/files/

>gem install buildr --platform x86-nswin32

The problem is still there, maybe that is something related to my 64-bit system. I fail to install this on windows.

I tried to update my ruby to 1.9.2 and update my gem.

Using this command to check the envrionment
>gem evn
RubyGems Environment:
  - RUBYGEMS VERSION: 1.8.13
  - RUBY VERSION: 1.9.2 (2011-07-09 patchlevel 290) [i386-mingw32]
  - INSTALLATION DIRECTORY: D:/tool/Ruby192/lib/ruby/gems/1.9.1
  - RUBY EXECUTABLE: D:/tool/Ruby192/bin/ruby.exe
  - EXECUTABLE DIRECTORY: D:/tool/Ruby192/bin
  - RUBYGEMS PLATFORMS:
    - ruby
    - x86-mingw32

>gem install rjb --platform x86-mswin32
>gem install buildr --platform x86-nswin32

edit the file in this directory D:/tool/Ruby192/lib/ruby/gems/1.9.1/gems/rjb-1.3.3/ext/jniwrap.h, change the line
from
typedef long long __int64;
to
typedef long long long64;

>cd D:/tool/Ruby192/lib/ruby/gems/1.9.1/gems/rjb-1.3.3/ext
>make
>make all
>make install
>cd ..
>gem spec ../../cache/rjb-1.3.3.gem --ruby > ../../specifications/rjb-1.3.3.gemspec

try again
>gem install buildr --platform x86-nswin32
>buildr --version

successful here. but error message in next steps
>buildr compile
error message:
Buildr aborted!
RuntimeError : can't create Java VM

solutions:
>gem install rjb -v 1.3.8 --platform x86-mswin32-60 
>env JAVA_HOME=D:\tool\jdk1.6 gem install buildr -v 1.4.6 --platform x86-nswin32-60

>cd d:\tool\Ruby192\lib\ruby\gems\1.9.1\gems\rjb-1.3.8-x86-mswin32-60\test
>ruby test.rb
new error message:
The program can't start because msvcrt-ruby18.dll is missing from your computer.
Try reinstalling the program to fix this problem.
>gem uninstall rjb -v 1.3.8
>gem uninstall rjb -v 1.3.4

>gem install rjb -v 1.3.8 --platform x86-mswin32-60 
>gem uninstall rjb -v 1.3.3

rollback my ruby to 1.8.6, and gem 1.3.7
>gem install rjb -v 1.3.8 --platform x86-mswin32-60 
>env JAVA_HOME=D:\tool\jdk1.6 gem install buildr -v 1.4.6 --platform x86-nswin32-60

new error message:
The procedure entry point rb_str_set_len could not be located in the dynamic link library msvcrt-ruby18.dll

solutions:
>gem uninstall rjb -v 1.3.3
>gem list
>gem install rjb -v 1.3.3 --platform mswin32
In the mean time, change the file jniwrap.h
>gem uninstall buildr -v 1.4.6
>gem install buildr -v 1.4.6 --platform mswin32
>ruby -v -e "p ENV['JAVA_HOME']"
ruby 1.8.6 (2010-02-04 patchlevel 398) [i386-mingw32]
"D:\\tool\\jdk1.6"
>ruby -v -e "p ENV['LD_LIBRARY_PATH']"

C:\Ruby186\lib\ruby\gems\1.8\gems\rjb-1.3.4\ext/rjb.c:1135: undefined reference to `rb_str_set_len'

rollback back to 1.9.2
>gem install rjb -v 1.3.4 --platform ruby

>cd D:/tool/Ruby192/lib/ruby/gems/1.9.1/gems/rjb-1.3.4/ext
>make
>make all
>make install
>cd ..
>gem spec ../../cache/rjb-1.3.4.gem --ruby > ../../specifications/rjb-1.3.4.gemspec

Fail at last, I give up here.

4. Check the Installation
>sudo buildr --version
Buildr 1.4.6

5. Running Buildr
put a buildfile on that directory. Something like ant,
#clean and rebuild
>sudo buildr clean build
>sudo buildr install

The related things are ruby, rake, antwrap, yaml.

references:
http://buildr.apache.org/
http://rubyinstaller.org/
http://sillycat.iteye.com/blog/1133322
http://sillycat.iteye.com/blog/1156180
http://sillycat.iteye.com/blog/1154490
http://ryang.iteye.com/blog/1147759
http://www.cesclub.com/bw/jishuzhongxin/Webjishu/2011/0813/3504.html
http://devjete.wordpress.com/2011/01/31/installing-rjb-1-3-4-on-windows-7-32bit-wo-vc/
http://devjete.wordpress.com/2011/01/31/ruby-1-9-2-rails-3-sqlite3-rjb-1-3-4-on-windows-7-32bit/
http://devjete.wordpress.com/author/somehi/
https://issues.apache.org/jira/browse/BUILDR-549
http://www.shaunambrose.com/2010/11/11/how-to-fix-the-msvcrt-ruby18-dll-is-missing-from-your-computer-error-message-in-ruby-on-rails/
http://stackoverflow.com/questions/3250406/msvcrt-ruby18-dll-was-not-found-with-ruby
http://rjb.rubyforge.org/


分享到:
评论

相关推荐

    03 PD introduce and application - 20190825.pptx

    里面介绍了PD方案和在实际中应用说明,及遇到的问题,解决方法,里面有市场上主流IC的介绍,供各工程技术人员学习和参考。

    Brocade Product introduce and Hand on Training.pptx

    Brocade Product introduce and Hand on Training....

    The OP Amp. Introduce and Applications

    非反相放大器的增益由连接到同相输入端和输出端之间的反馈电阻(Rf)和输入电阻(R1)决定,增益公式为:\[ G = 1 + \frac{R_f}{R_1} \]。 ### 反相放大器(Inverting Amplifier) 反相放大器是另一种常见的运算...

    team introduce.key

    team introduce.key

    IR Remote Control introduce and protocol英语文献

    3. **数据编码**:数据位通过不同长度的脉冲来表示,一般采用“0”和“1”的二进制编码。 4. **校验码**:每个命令后都会跟随一个校验码,以确保数据的完整性。 #### 三、Sharp协议详解 Sharp协议同样是红外遥控...

    M1 RF card introduce

    introduce for M1 RF card

    IntroduceIntroduceIntroduceIntroduce

    1. 自我介绍:在面试中,个人的自我介绍是非常关键的第一步。HHJ,26岁,他描述自己是一个勤奋、开放、随和、有责任感的人,学习能力强,适应新环境快,并且喜欢团队合作。他的工作态度严谨负责,这体现了他在职场中...

    Beginning Robotics with Raspberry Pi and Arduino_Using Python and OpenCV

    programming languages, install and configure a Linux environment, and work with computer vision. Everything else you do with robots will be an extension of the lessons learned in this book.

    R Data Structures and Algorithms [AZW3/MOBI/EPUB/PDF(conv)]

    R Data Structures and Algorithms English | 21 Nov. 2016 | ISBN: 1786465159 | 276 Pages | AZW3/MOBI/EPUB/PDF (conv) | 39.49 MB Increase speed and performance of your applications with efficient data ...

    SST_MCU_Introduce选型

    ### SST_MCU_Introduce选型知识点详解 #### 一、SST89系列单片机概述 SST89系列单片机属于MCS-51标准系列,由深圳科赛电子提供支持和服务。该系列单片机具备高度兼容8052系列单片机的特点,并在此基础上进行了多项...

    Learning Redis

    Build solutions and enhance your web applications in Redis Understand the persistent mechanism for better scalability Configure and tune the server to improve performance Identify bottlenecks and how ...

    Introduce to EIB Control Network and Protocol

    EIB协会(EIBA,European Installation Bus Association)提供了一个标准化的参考手册系列,为想要深入了解和应用EIB技术的人员提供了详尽的指导和规范(例如手册第1卷和第3卷)。通过这些规范文档,制造商可以确保...

    Introduce to Algorithms, A Creative Approach

    Introduce to Algorithms, A Creative Approach .英文版

    Linux File System Introduce

    Linux文件系统是一个多层次的存储数据和文件的结构,它提供了一种组织和存储数据的方式,以便用户可以长期保存、共享和访问这些数据。这个系统是操作系统中最重要的组成部分之一,因为它不仅存储数据,还提供了一套...

    introduce spring

    Spring 是一个开源的 Java 应用程序开发框架,由 Rod Johnson 在其著作《Expert One-on-One J2EE Design and Development》中首次提出。它为开发者提供了一个配置管理工具,解决了企业应用开发的复杂性,支持使用 ...

    introduce to linux.html

    1. 开源自由:Linux遵循GNU通用公共许可证(GPL),其源代码可供任何人查看、修改和分发,这促进了社区的协作和创新。 2. 跨平台:Linux不仅能在x86架构上运行,还支持ARM、MIPS等多种处理器架构,覆盖了从嵌入式...

    HTML5 and CSS3 Transition, Transformation, and Animation

    HTML5 and CSS3 technologies are changing the face of the web, they are making the way we build websites, add new features, and develop more immersive experiences much faster and accessible to the ...

    Applying UML and Patterns: An Introduction to Object-Oriented Analysis and Design and Iterative Development (3rd Edition)

    These case studies incrementally introduce key skills, essential OO principles and patterns, UML notation, and best practices. You won\'t just learn UML diagramsyou\'ll learn how to apply UML in the ...

Global site tag (gtag.js) - Google Analytics