Articles of macos

mac os x上的Tesseract-ocr gem问题

我已经安装了tesseract-ocr(0.1.5)gem。 还安装了依赖项(tesseract / 3.04.00和leptonica / 1.72) Mac OS X Yosemity。 当我执行rake db:migrate出现错误: rake aborted! CompilationError: compile error: see logs at /var/folders/xg/g9n7qvns5z1gsr_yjh09n1nm0000gn/T/.ffi-inline-501/d2f8bb8a1867b800ff8ad69a3b850c91521b3760.log /Users/user/.rvm/gems/ruby-2.2.2@project/gems/ffi-inline-0.0.4.3/lib/ffi/inline/compilers/gcc.rb:35:in `compile’ /Users/user/.rvm/gems/ruby-2.2.2@project/gems/ffi-inline-0.0.4.3/lib/ffi/inline/builders/c.rb:114:in `shared_object’ /Users/user/.rvm/gems/ruby-2.2.2@project/gems/ffi-inline-0.0.4.3/lib/ffi/inline/builders.rb:90:in `block in build’ /Users/user/.rvm/gems/ruby-2.2.2@project/gems/ffi-inline-0.0.4.3/lib/ffi/inline/builders.rb:87:in `instance_eval’ /Users/user/.rvm/gems/ruby-2.2.2@project/gems/ffi-inline-0.0.4.3/lib/ffi/inline/builders.rb:87:in `build’ /Users/user/.rvm/gems/ruby-2.2.2@project/gems/ffi-inline-0.0.4.3/lib/ffi/inline/inline.rb:54:in `singleton_inline’ /Users/user/.rvm/gems/ruby-2.2.2@project/gems/ffi-inline-0.0.4.3/lib/ffi/inline/inline.rb:39:in `inline’ /Users/user/.rvm/gems/ruby-2.2.2@project/gems/tesseract-ocr-0.1.5/lib/tesseract/c/baseapi.rb:30:in `’ /Users/user/.rvm/gems/ruby-2.2.2@project/gems/tesseract-ocr-0.1.5/lib/tesseract/c/baseapi.rb:27:in `’ /Users/user/.rvm/gems/ruby-2.2.2@project/gems/tesseract-ocr-0.1.5/lib/tesseract/c/baseapi.rb:25:in `’ /Users/user/.rvm/gems/ruby-2.2.2@project/gems/tesseract-ocr-0.1.5/lib/tesseract/c/baseapi.rb:25:in `’ /Users/user/.rvm/gems/ruby-2.2.2@project/gems/activesupport-4.2.3/lib/active_support/dependencies.rb:274:in `require’ /Users/user/.rvm/gems/ruby-2.2.2@project/gems/activesupport-4.2.3/lib/active_support/dependencies.rb:274:in `block in require’ /Users/user/.rvm/gems/ruby-2.2.2@project/gems/activesupport-4.2.3/lib/active_support/dependencies.rb:240:in `load_dependency’ /Users/user/.rvm/gems/ruby-2.2.2@project/gems/activesupport-4.2.3/lib/active_support/dependencies.rb:274:in `require’ […]

使用ImageMagick进行Brew链接

安装: ostaptan:~ostap $ brew install imagemagick –disable-openmp –from-source ==> Downloading http://downloads.sf.net/project/machomebrew/mirror/ImageMagick-6.7.7-6.tar.bz2 Already downloaded: /Library/Caches/Homebrew/imagemagick-6.7.7-6.tar.bz2 ==> Patching patching file configure Hunk #1 succeeded at 32371 (offset 447 lines). ==> ./configure –disable-osx-universal-binary –without-perl –prefix=/usr/local/Cellar/imagemagick/6.7.7-6 –enable-shared –disable-static ==> make install Error: The linking step did not complete successfully The formula built, but is not symlinked into /usr/local You […]

使用MAMP 2.2在Mac上“gem install mysql2”

当我尝试在我当前的目录(这是一个新的rails项目)中运行rails server时,它说我需要安装mysql2 gem。 起初,我不知道这意味着什么……然后,我做了一些戳,最后决定安装gem。 但是,我得到了这个超级麻烦的错误(因为我只花了2个小时试图调查,并解决了另一个错误)。 我正处于放弃的边缘,但我真的想试试铁轨。 请帮忙! 目前,如果我运行sudo gem install mysql2 ,或者甚至有些人告诉我在线做, gem install mysql — \ –with-mysql-config=/Applications/MAMP/Library/bin/mysql_config (我有MAMP) ,它给我以下错误: Building native extensions. This could take a while… ERROR: Error installing mysql2: ERROR: Failed to build gem native extension. /Users/vicky/.rvm/rubies/ruby-2.0.0-p247/bin/ruby extconf.rb checking for ruby/thread.h… yes checking for rb_thread_call_without_gvl() in ruby/thread.h… yes checking for rb_thread_blocking_region()… yes […]

Mac(计算机)给Rails开发人员带来了什么好处?

我试图理解为什么在Mac上发生如此多的Rails开发? 或者这只是一个神话? 有没有确凿的证据支持这一点?

无法更新RubyGems

我在将RubyGems从1.1.1版更新到最新版时遇到了困难。 我尝试过以下方法: gem更新 结果: 更新已安装的gem 批量更新Gem源索引: http : //gems.rubyforge.org/ 无需更新 和 gem install ruby​​gems-update 结果: 批量更新Gem源索引: http : //gems.rubyforge.org/ 批量更新Gem源索引: http : //gems.rubyforge.org/ 错误:安装rubygems-update时出错: rubygems-update需要构建器(> = 0) 和 gem install ruby​​gems-update update_rubygems 结果: 批量更新Gem源索引: http : //gems.rubyforge.org/ 批量更新Gem源索引: http : //gems.rubyforge.org/ 错误:安装rubygems-update时出错: rubygems-update需要构建器(> = 0) 错误:无法在本地或存储库中找到update_rubygems 然后我按照类似问题的建议检查了我是否在我的远程资源中使用了http://gems.rubyforge.org/ 。 这是gem环境: RubyGems环境: – RUBYGEMS版本:1.1.1 – RUBY版本:1.8.6(2008-08-11 patchlevel […]

安装sqlite3(1.3.7)时发生错误,Bundler无法继续

当我使用命令git push heroku master时,我收到此错误。 $ git push heroku master Counting objects: 126, done. Delta compression using up to 8 threads. Compressing objects: 100% (110/110), done. Writing objects: 100% (126/126), 36.61 KiB, done. Total 126 (delta 19), reused 0 (delta 0) —–> Removing .DS_Store files —–> Ruby/Rails app detected —–> Installing dependencies using Bundler version 1.3.2 […]

‘mysql的未定义方法init:Class’

我一直遇到MySQL服务器安装问题,在停电后搞砸了。 组态 Intel i5 Mac运行OS X 10.6.5 Ruby 1.9.2已安装 安装了Rails 3.0.1 MySQL服务器(最后)安装并运行 我完全重新安装了MySQL,它删除了本地开发/测试/生产数据库。 所以,我已经运行了create database development; 在MySQL中,让dev数据库为迁移做好准备。 目前的目标 运行rake db:migrate以重新获取我的数据库。 (我目前无法从Rails访问我的数据库或Mysql。) 错误 使用’mysql’, ‘2.8.1’并运行rake db:migrate ,我收到错误: rake aborted! undefined method ‘init’ for Mysql:Class 堆栈跟踪: /Users/sscirrus/.rvm/gems/ruby-1.9.2-p0/gems/activerecord-3.0.1/lib/active_record/connection_adapters/mysql_adapter.rb:30:in ‘mysql_connection’ /Users/sscirrus/.rvm/gems/ruby-1.9.2-p0/gems/activerecord-3.0.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:230:in ‘new_connection’ /Users/sscirrus/.rvm/gems/ruby-1.9.2-p0/gems/activerecord-3.0.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:238:in ‘checkout_new_connection’ /Users/sscirrus/.rvm/gems/ruby-1.9.2-p0/gems/activerecord-3.0.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:194:in ‘block (2 levels) in checkout’ /Users/sscirrus/.rvm/gems/ruby-1.9.2-p0/gems/activerecord-3.0.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:190:in ‘loop’ /Users/sscirrus/.rvm/gems/ruby-1.9.2-p0/gems/activerecord-3.0.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:190:in ‘block in checkout’ /Users/sscirrus/.rvm/rubies/ruby-1.9.2-p0/lib/ruby/1.9.1/monitor.rb:201:in ‘mon_synchronize’ /Users/sscirrus/.rvm/gems/ruby-1.9.2-p0/gems/activerecord-3.0.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:189:in […]

在Mac OS X 10.6(SL)上安装Rails

我刚刚在我的雪豹上安装了RoR ..并且发现了rails gem已经安装好了.. 这是正常的吗? 需要更新吗? 这是否与textmate一起安装?

安装RVM时运行’make -j2’时出错

我正在按照本教程在Mac上设置Rails: http://www.moncefbelyamani.com/how-to-install-xcode-homebrew-git-rvm-ruby-on-mac/ 当我进入第6步:使用Ruby 1.9.3安装RVM ,并运行curl -L https://get.rvm.io | bash -s stable –ruby curl -L https://get.rvm.io | bash -s stable –ruby安装RVM,我收到以下错误: Error running ‘make -j2’, please read ~/.rvm/log/ruby-1.9.3-p385/make.log There has been an error while running make. Halting the installation. 在make.log中,这是它生成的内容: regparse.c:582:15: error: implicit conversion loses integer precision: ‘st_index_t’ (aka ‘unsigned long’) to ‘int’ [-Werror,-Wshorten-64-to-32] return t->num_entries; […]

安装Xcode 4.3.2并缺少gcc时如何使用RVM安装Ruby 1.9.3?

我用Lion购买了一台新的iMac并安装了Xcode 4.3.2。 跑完之后 curl -L get.rvm.io | bash -s stable 我打开了一个新的bash ,然后使用了 $ rvm install 1.9.3 安装Ruby 1.9.3,但有错误,日志说C编译器不存在。 并且rvm requirements说: $ rvm requirements […] Xcode 4.3+ users – please be warned – only ruby-1.9.3-p125+ is partially supported – in case of any compilation issues: * downgrade to Xcode 4.1 * uninstall Xcode and install osx-gcc-installer […]