Tag: windows 7

rake db:在Win7 x64上创建失败

已更新以包含跟踪信息 我正在为Ruby on Rails开发设置Win7机器,似乎遇到了我的rake任务的问题。 当我调用rake db时:创建cmd窗口会占用很长时间并转储以下内容: C:\my\directory\rails>rake db:create –trace (in C:/my/directory/rails) ** Invoke db:create (first_time) ** Invoke db:load_config (first_time) ** Invoke rails_env (first_time) ** Execute rails_env ** Execute db:load_config ** Execute db:create foo already exists foo already exists C:/Ruby192/bin/rake: [BUG] Segmentation fault ruby 1.9.2p136 (2010-12-25) [i386-mingw32] — control frame ———- c:0001 p:0000 s:0002 b:0002 l:000b24 […]

Windows 7上Rails 3.1中本地使用的应用程序的最佳部署策略?

我正在开发Rails 3.1中的2个应用程序(很快就会升级),并注意到我目前的策略有其缺点。 我目前正在做的是: 直接在开发目录上工作,使用Git进行版本控制(这对我来说非常适合)。 我已经定义了数据库(省略了没有趣的部分): development: database: db/dev.db production: database: db/dev.db 我有两个应用程序一直在生产模式下运行,其中端口定义为3008和3009。 有时,我想改变一些小东西,然后直接使用默认值启动两个应用程序之一的开发服务器: rails s thin (port == 3000)。 我注意到以下事情不能很好地发挥作用。 当我更改CSS或Javascript文件时,我经常要清理(以及在开发重建之后)资产。 有时,开发服务器从一个服务器获取文件(CSS和Javascript),并将它们用于另一个服务器。 我必须手动清理浏览器的缓存以避免这种情况。 在我的计算机上本地并行开发和使用这两个应用程序的更好策略是什么? 欢迎任何提示和提示。 我应该使用部署工具(Capistrano)吗? 我应该为这个鸿沟推出自己的Rake任务吗? 或者我是否会错过一些可以治愈伤口的神奇开关(听起来很可怜​​:-))?

为Windows 7安装Ruby on Rails(最新)

我是设计师而不是编码器,并且在第一次安装时遇到问题。 我下载了Rails 1.8.6和Instant Rails。 我打开一个控制台,尝试更新gem。 没有什么在那里工作。 我想我会删除所有内容并重新开始,因为我确定我现在已经破坏了一些东西。 我真的想考虑今天购买Mac只是为了让它运转起来。 你推荐什么:1。下载什么? 2.采取的步骤? 任何帮助表示赞赏。 谢谢!

Bluecloth v2.0.10与Windows 7无法正常工作

在Ruby 187中,我从http://rubyinstaller.org/downloads下载了devkit,并按照https://github.com/oneclick/rubyinstaller/wiki/Development-Kit的说明进行操作。 我还确保通过以下烟雾测试正确安装devkit。 然后我尝试安装蓝布(v2.0.10)。 它失败了以下错误: C:\test\typo>gem install bluecloth –platform=ruby Temporarily enhancing PATH to include DevKit… Building native extensions. This could take a while… ERROR: Error installing bluecloth: ERROR: Failed to build gem native extension. c:/Ruby187/bin/ruby.exe extconf.rb checking for srand()… yes checking for random()… no checking for rand()… yes checking for bzero() in string.h,strings.h… no checking […]

Ruby on Rails:如何在Windows 7上安装json?

我使用http://railsinstaller.org上的Windows安装程序安装了Ruby on Rails。 安装没有任何错误。 但是,当我尝试: rails new blog 我收到以下错误: 使用本机扩展安装json(1.6.5)Gem :: Installer :: ExtensionBuildError:错误:无法构建gem本机扩展。 C:/opt/Ruby_on_Rails/RailsInstaller/Ruby1.9.2/bin/ruby.exe extconf.rb安装json(1.6.5)时发生错误,Bundler无法继续。 在捆绑之前确保gem install json -v ‘1.6.5’成功。 根据上述建议,我跑了: gem install json -v ‘1.6.5’ 这一次,我收到以下错误:暂时增强PATH以包含DevKit …构建本机扩展。 这可能需要一段时间…错误:安装json时出错:错误:无法构建gem本机扩展。 C:/opt/Ruby_on_Rails/RailsInstaller/Ruby1.9.2/bin/ruby.exe extconf.rb 有人请告诉我如何能够解决这个错误? 谢谢。

如何在Windows 7上的Rails 3应用程序中使用“mysql2”gem?

我尝试在Windows 7 32位上安装mysql2 gem。 我跑: gem install mysql2 我收到以下错误: ERROR: Error installing mysql2: The ‘mysql2’ native gem requires installed build tools. Please 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’ 任何可能导致此错误的想法,以及如何解决这个问题? UPDATE 我做了这里描述的所有事情,但我无法弄清楚最后一步: gem install mysql2 — ‘–with-mysql-lib=”c:\Program Files\MySQL\MySQL Server 5.1\lib\opt” –with-mysql-include=”c:\Program Files\MySQL\MySQL Server […]

Windows 7 x64中Rails的MySQL驱动程序

我在新安装的Windows 7机器上连接MySQL数据库时遇到问题。 我尝试迁移数据库时遇到此错误。 !!! The bundled mysql.rb driver has been removed from Rails 2.2. Please install the mysql gem and try again: gem install mysql. rake aborted! 193: %1 is not valid Win32 application – C:/Ruby/lib/ruby/gems/1.8/gems/mysql-2.8.1-x86-mswin32/lib/1.8/mysql_api.so 我目前已安装 ruby 1.8.6 (2008-08-11 patchlevel 287) [i386-mswin32] mysql version 5.0.86 for Win64 gem 1.3.1 mysql-2.8.1-x86-mswin32

在Windows上安装Ruby on Rails

我正在Windows 7上安装Ruby on Rails。我安装了ruby-1.9.2(在c:\ ruby​​中)并且我使用gem install rails命令gem install rails (从c:\ ruby​​ \ bin执行此操作)因为这是我可以调用命令的唯一地方)。 然后我运行rails new my_app命令。 我遇到的问题是尝试从apps文件夹中运行rails server命令(c:\ ruby​​ \ bin \ my_app)我收到消息: ‘rails’ is not recognized… 我做错了什么?

Windows 7上的RubyMine 3.0设置

所有, 我下载/安装了1.9.2 windows安装程序,然后安装了RubyMine3.0RC,并安装了它。 打开一个新的Rails项目,选择mysql作为DB,当我“运行”它时会出现以下错误。 D:\ProgramFiles\Ruby192\bin\ruby.exe -e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift) C:/Users/Rob/RubymineProjects/test1/script/rails server -p 3000 -b 127.0.0.1 -e development D:/ProgramFiles/Ruby192/lib/ruby/gems/1.9.1/gems/mysql2-0.2.6-x86-mingw32/lib/mysql2/mysql2.rb:2:in `require’: 126: The specified module could not be found. – D:/ProgramFiles/Ruby192/lib/ruby/gems/1.9.1/gems/mysql2-0.2.6-x86-mingw32/lib/mysql2/1.9/mysql2.so (LoadError) from D:/ProgramFiles/Ruby192/lib/ruby/gems/1.9.1/gems/mysql2-0.2.6-x86-mingw32/lib/mysql2/mysql2.rb:2:in `’ from D:/ProgramFiles/Ruby192/lib/ruby/gems/1.9.1/gems/mysql2-0.2.6-x86-mingw32/lib/mysql2.rb:7:in `require’ from D:/ProgramFiles/Ruby192/lib/ruby/gems/1.9.1/gems/mysql2-0.2.6-x86-mingw32/lib/mysql2.rb:7:in `’ from D:/ProgramFiles/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.7/lib/bundler/runtime.rb:64:in `require’ from D:/ProgramFiles/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.7/lib/bundler/runtime.rb:64:in `block (2 levels) in require’ from D:/ProgramFiles/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.7/lib/bundler/runtime.rb:62:in `each’ from D:/ProgramFiles/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.7/lib/bundler/runtime.rb:62:in `block in require’ […]

在Windows上安装libbzip2

我试图在Windows 7上安装libbzip2。(其实我想安装wp2txt包,但似乎需要libbzip2)。 我按照Alex的建议安装了“Bzip2 for Windows”。 但我得到以下错误。 C:\Users\John>gem install bzip2-ruby — –with-bz2-include=”C:\Program Files (x86)\GnuWin32\include” — –with-bz2-lib=”C:\Program Files (x86)\GnuWin32\lib” Temporarily enhancing PATH to include DevKit… Building native extensions. This could take a while… ERROR: Error installing bzip2-ruby: ERROR: Failed to build gem native extension. C:/RailsInstaller/Ruby1.9.3/bin/ruby.exe extconf.rb –with-bz2-include=C:\Program Files (x86)\GnuWin32\include — –with-bz2-lib=C:\Program Files (x86)\GnuWin32\lib checking for bzlib.h… no […]