rubygems

Cannot restart thin via remote machine

浪尽此生 提交于 2019-12-12 01:45:12
问题 I use Thin to serve the rails application located on a test machine. I'd like to be able to stop/start thin from my local machine but the following does not work: ssh luc@test_machine '/home/luc/.rvm/gems/ruby-1.9.3-p125/bin/thin -v' I got the following error message: /home/luc/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/site_ruby/1.9.1/rubygems/dependency.rb:247:in `to_specs': Could not find thin (>= 0) amongst [bigdecimal-1.1.0, io-console-0.3, json-1.5.4, minitest-2.5.1, rake-0.9.2.2, rdoc-3.9.4]

bundle install results in “mapping values are not allowed in this context” error

久未见 提交于 2019-12-12 01:35:55
问题 I have a rails 4 project that has been working for some time. I attempted to install taps but got an error message: $ gem install taps /usr/local/rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/psych.rb:370:in `parse': (<unknown>): mapping values are not allowed in this context at line 2 column 29 (Psych::SyntaxError) from /usr/local/rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/psych.rb:370:in `parse_stream' from /usr/local/rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/psych.rb:318:in `parse' from /usr/local/rvm/rubies

Cannot execute mysql_config at /usr/local/bin/mysql_config

只谈情不闲聊 提交于 2019-12-12 01:15:04
问题 On running bundle install, coming up with the following error. So it's not an issue of finding the config file - it knows where it is...just not executing it. I do have xcode installed. I've checked on multiple questions and a lot of it is pointing me to being explicit on where the config file is, but that's not my issue per se. Any ideas? Installing mysql2 0.3.21 with native extensions Gem::Ext::BuildError: ERROR: Failed to build gem native extension. current directory: /private/var/folders

When running 'bundle install', bundler tries to install gem that is already installed locally

心已入冬 提交于 2019-12-12 00:55:38
问题 Had some trouble with bundler trying to install the 'nokogiri' gem, so we went ahead and installed it manually with 'gem install nokogiri' - this was within an RVM ruby, and installed with native extensions. Now, when running 'bundle install', it appears that bundle still tries to install nokogiri! I've seen it said that when bundle runs, it checks locally for gems first, why might this not be happening? UPDATE: We are using Capistrano to deploy, and when i override the 'bundle:install' task

Rails 4 fails on sqlite3

寵の児 提交于 2019-12-12 00:27:26
问题 I get this error when I run a new empty rails (4.0) site: Specified 'sqlite3' for database adapter, but the gem is not loaded. Add `gem 'sqlite3'` to your Gemfile. I have a valid sqlite3 gem built with the devkit. I made a dumb test for that: w:...> ruby hello.rb hello world test.db is done. Which also creates an empty database, called "test.db" as shown below. Simple ruby script: require "sqlite3" puts "hello world" # Open a database db = SQLite3::Database.new "test.db" puts "test.db is done

Installing gems with extensions always fails

◇◆丶佛笑我妖孽 提交于 2019-12-12 00:04:13
问题 I just setup an Ubuntu 13.04 server, and installed RVM 1.21.11, Ruby 1.9.3-p448, and Rubygems 2.0.5 . Many gems, such as mongo , awesome_print , aws-s3 , and json , installed successfully. However, gems that compile an extension fail. I've tried to install nokogiri , mongo_ext , and bson_ext . They all fail in the same way, as shown below. Any idea how to fix this? [nick@mongo01 ~] gem install mongo_ext -u -V --backtrace HEAD http://rubygems.org/latest_specs.4.8.gz 302 Moved Temporarily HEAD

Could not find gem 'rails' headaches

偶尔善良 提交于 2019-12-11 23:49:10
问题 I'm on Mac OS X 10.6 Snow Leopard. I just updated my Ruby stuff using: sudo gem update Unfortunately, it broke everything. When I try to run a simple command in my website directory, like: rails generate model User It failed, with this error: Could not find gem 'rails (= 3.0.3, runtime)' in any of the gem sources listed in your Gemfile. Try running bundle install . So I tried running bundle install rails . It succeeded! So I tried running rails . It failed. So I tried getting the Rails

How do I bypass validation rules set for a nested attribute in ruby on rails?

ぃ、小莉子 提交于 2019-12-11 23:25:10
问题 I have a micropost form which allows a user to upload a photo and type some content to go with it. The image file field is the nested attribute from my photo model. It has a validation rule "presence => true". This is not required for microposts. User are allowed to post microposts without images/photos. How ever I use the same photo model for the users image gallery and a photo is required at the time of form submission so I can't disable this rule. Is there any way to bypass the validation

Rbenv not rehashing correctly and making shims

房东的猫 提交于 2019-12-11 23:08:59
问题 The bottom line is, rbenv isn't making shims. I've exhausted ideas of what could be the problem. After a few days of banging my head against a wall to fix but no avail, I think it's time to ask for help. I'm attempting to make the switch from RVM to rbenv, so that could obviously be a factor here. Any ideas/help would be great. Here's what happens: [09:38] ~ $ gem install pry Fetching: pry-0.10.2.gem (100%) Successfully installed pry-0.10.2 1 gem installed [09:39] ~ $ rbenv rehash [09:40] ~ $

Compass unable to find files in project

心不动则不痛 提交于 2019-12-11 19:52:11
问题 I am editing the a wordpress template that makes use of SASS. When I edit the .scss file and save it, CodeKit throws out this error. Compass was unable to compile one or more files in the project: error app.scss (Line 9 of _settings.scss: File to import not found or unreadable: foundation/functions. Load paths: /Library/WebServer/Documents/dev/ecpr_sgoc/scss /Library/Ruby/Gems/2.0.0/gems/compass-0.12.2/frameworks/blueprint/stylesheets /Library/Ruby/Gems/2.0.0/gems/compass-0.12.2/frameworks