gem

I can't install any gem or updates in Leopard

眉间皱痕 提交于 2019-12-13 01:46:54
问题 bogon:~ Zhulin$ ruby -v ruby 1.8.6 (2009-06-08 patchlevel 369) [universal-darwin9.0] bogon:~ Zhulin$ rails -v Rails 1.2.6 bogon:~ Zhulin$ gems -v -bash: gems: command not found bogon:~ Zhulin$ sudo gem install heroku Password: ERROR: While executing gem ... (Gem::RemoteSourceException) HTTP Response 302 fetching http://gems.rubyforge.org/yaml bogon:~ Zhulin$ gem -v 1.0.1 bogon:~ Zhulin$ gem list *** LOCAL GEMS *** actionmailer (1.3.6) actionpack (1.13.6) actionwebservice (1.2.6) activerecord

bundle exec fails with “could not find rake-10.1.0 in any of the sources”

落花浮王杯 提交于 2019-12-13 01:25:42
问题 I'm attempting to a deploy to a staging server using capistrano an existing application that seems to deploy fine to the production server. the staging server is a fresh build and i think it's a config issue, but I can't figure it out. capistrano fails on assets:precompile try's to run executing "cd -- /www/sites/{appname} /releases/20131009211055 && RAILS_ENV=production RAILS_GROUPS=assets bundle exec rake assets:precompile" at which point it fails with the following: [out :: {servername}]

Can't start rails server mysql2 gem?

杀马特。学长 韩版系。学妹 提交于 2019-12-13 01:13:31
问题 Ruby and rails noob, made a project and got this far. But now I'm getting these errors when trying to run rails server. I'm using Windows vista and ruby 2.0.0. D:/Ruby200/lib/ruby/gems/2.0.0/gems/mysql2-0.3.11-x86-mingw32/lib/mysql2/mysql2. rb:2:in `require': cannot load such file -- mysql2/2.0/mysql2 (LoadError) from D:/Ruby200/lib/ruby/gems/2.0.0/gems/mysql2-0.3.11-x86-mingw32/lib/m ysql2/mysql2.rb:2:in `<top (required)>' from D:/Ruby200/lib/ruby/gems/2.0.0/gems/mysql2-0.3.11-x86-mingw32

devise gem install for Ruby on Rails

走远了吗. 提交于 2019-12-12 19:52:42
问题 just started learning Ruby on Rails, I'm trying to install the devise gem for creating a login/signin lesson, but I keep getting the following messages.. Could anyone help please? and feel free to correct me on how i'm asking the questions. New to this community and would love to be involved. alexs-air:pinteresting alexkwon$ rails generate devise:install /Users/alexkwon/.rvm/gems/ruby-2.1.2/gems/activerecord-4.1.1/lib/active_record/dynamic_matchers.rb:26:in `method_missing': undefined method

Generating RDOCs for locally installed gems

旧巷老猫 提交于 2019-12-12 18:09:21
问题 I am trying to contribute to a gem I recently took interest in - Nesta. The developer has done a great job in creating one of the lightest, thinest CMSs you can find and I want to document it. I have read through the code and commented on a few methods to the best of my knowledge. However, I seek to test this out locally by calling gem server and seeing the changes on my machine before pushing it online. Things I have tried: Manual edit. Documented the file. Fired up gem server . Using the

BSON::ObjectId vs Mongo::ObjectID

杀马特。学长 韩版系。学妹 提交于 2019-12-12 15:22:26
问题 In online API they are referring to Mongo::ObjectID . I have require 'mongo' but still ruby fails to find it. For instance, I need to find an object by its Id and I'm doing: mongo_db['post'].find({_id: Mongo::ObjectID(params[:id])}).next and it seems that it can't find Mongo::ObjectID and results in: NoMethodError - undefined method ``ObjectID' for Mongo:Module: So after some time I started to require 'bson' and doing mongo_db['post'].find({_id: BSON::ObjectId(params[:id])}).next and it

Why is my rake call causing an 'undefined method `source_index`' error?

江枫思渺然 提交于 2019-12-12 13:49:54
问题 I am trying to run bundle exec rake db:migrate then encountered the following error. bundle exec rake db:migrate --trace ** Invoke db:migrate (first_time) ** Invoke environment (first_time) ** Execute environment rake aborted! undefined method `source_index' for Gem:Module C:/Ruby193/lib/ruby/gems/1.9.1/gems/rails-2.3.17/lib/rails/gem_dependency.rb:21:in `add_frozen_gem_path' C:/Ruby193/lib/ruby/gems/1.9.1/gems/rails-2.3.17/lib/initializer.rb:298:in `add_gem_load_paths' C:/Ruby193/lib/ruby

Error when bundle install on windows

做~自己de王妃 提交于 2019-12-12 13:04:59
问题 When i try to run bundle install, i got this error : Installing hiredis (0.3.2) with native extensions Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension. C:/RailsInstaller/Ruby1.9.2/bin/ruby.exe extconf.rb gcc -std=c99 -pedantic -c -O3 -fPIC -Wall -W -Wstrict-prototypes -Wwrite-strings -g -ggdb net.c net.c:1:0: warning: -fPIC ignored for target (all code is position independent) net.c:35:24: fatal error: sys/socket.h: No such file or directory compilation

“stack level too deep” while compiling assets

北慕城南 提交于 2019-12-12 11:24:21
问题 After running brew upgrade , or something else which updated my gems/ruby version, my rake assets:precompile task no longer works. I get this error: rake aborted! stack level too deep (in /Users/Jordan/Development/reejay/rails/reejay/app/assets/stylesheets/blog_player.css.scss) /Users/Jordan/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2.2/lib/rake/task.rb:162 Tasks: TOP => assets:precompile:primary rake aborted! Command failed with status (1): [/usr/local/Cellar/ruby/1.9.3-p0/bin/ruby /...] /usr

'Could not find pg-0.12.2 in any of the sources' when running rspec

走远了吗. 提交于 2019-12-12 10:39:32
问题 I'm working on building the twitter clone app in Hartl's Rails Tutorial. I cloned my git repo (https://github.com/stewartmccoy/rails_tutorial) and put code on to my personal computer, which had previously been on my work computer. So, my developer environment might be slightly different than what's specified in my Gemfile. My environment: Mac OS 10.6.8 Rails 3.2.13 ruby 1.9.3p392 (2013-02-22 revision 39386) [x86_64-darwin10.8.0] * LOCAL GEMS * actionmailer (3.2.13, 3.2.11, 3.2.1) actionpack