Cygwin/Rails RailsRubySQLiteTcl
程序员文章站
2024-02-12 19:59:22
...
A few notes taken while trying to get Rails working on Cygwin:
- Stock Ruby works perfectly (so far)
- Getting gem to work is also standard fare (get tar file, unpack, ruby setup.rb)
- Installing Rails using gem works first time, but is slow (generating documentation takes a long time)
- Tests work, but there's no decent database support.
- The sqlite-ruby gem does not like SQLite3 (which, incidentally, installs and works fine in Cygwin, provided you run configure --disable-tcl and use a separate build directory). I have, in fact, tried gem install sqlite3, but the results were less than optimal. Maybe next time.
The right incantation for building the gem seems to be:
gem install sqlite-ruby -- --with-sqlite-lib=/usr/local/lib \--with-sqlite-include=/usr/local/include
...but it does not like the new "3" suffix on headers and libs.
- Unpacking sqlite-2.8.16 and installing it (also without Tcl support) worked:
$ gem install sqlite-ruby -- --with-sqlite-lib=/usr/local/lib \> --with-sqlite-include=/usr/local/includeAttempting local installation of 'sqlite-ruby'Local gem file not found: sqlite-ruby*.gemAttempting remote installation of 'sqlite-ruby'Select which gem to install for your platform (i386-cygwin) 1. sqlite-ruby 2.2.3 (mswin32) 2. sqlite-ruby 2.2.3 (ruby) 3. sqlite-ruby 2.2.2 (mswin32) 4. sqlite-ruby 2.2.2 (ruby) 5. sqlite-ruby 2.2.1 (ruby) 6. sqlite-ruby 2.2.1 (mswin32) 7. sqlite-ruby 2.2.0 (mswin32) 8. sqlite-ruby 2.2.0 (ruby) 9. sqlite-ruby 2.1.0 (ruby) 10. sqlite-ruby 2.1.0 (mswin32) 11. sqlite-ruby 2.0.3 (ruby) 12. sqlite-ruby 2.0.2 (ruby) 13. Cancel installation> 2Building native extensions. This could take a while......Successfully installed sqlite-ruby-2.2.3Installing RDoc documentation for sqlite-ruby-2.2.3...
If you have problems building the native extensions, try doing a rebaseall on a standard Cygwin prompt without any Cygwin-based daemons running.
推荐阅读
-
基于sqlite的ror例子 博客分类: Ruby on Rails SQLitePHPSQL ServerTclMySQL
-
Cygwin/Rails RailsRubySQLiteTcl
-
rails3的开发起步 博客分类: 脚本语言
-
rails测试中遇到的一些问题 博客分类: Rails2 测试Rails
-
rails3的开发起步 博客分类: 脚本语言
-
beast安装 博客分类: rails RubyRailsSQLiteSVNJavaScript
-
What's new in Edge Rails: EXPLAIN
-
cygwin环境下gprof+gprof2dot+dot生成函数关系结构图
-
Rails执行数据库回滚时报错:ActiveRecord::IrreversibleMigrati
-
终于知道怎么把rails Web程序打包成可执行文件了 博客分类: Ruby on Rails RailsWebSQLiteGmailIDEA