rubygems

What's the point of freezing your Rails version/gems?

情到浓时终转凉″ 提交于 2020-01-19 11:12:04
问题 What does that mean? In the instructions for a project, it said to "freeze the Rails gems". Is that different from freezing the Rails version? What's freezing about? 回答1: If one of the authors of a gem you use introduce a new version of the gem, there is a possibility the new version introduces backwards incompatible changes that would break your code. Freezing a gem puts it into the vendor folder of your application, and it will not be automatically updated on its own. Rails will use this

Ruby 1.9.2 and Rails 3 cannot open rails console

丶灬走出姿态 提交于 2020-01-18 21:34:31
问题 [gkaykck@main myApplication]$ rails console /usr/local/lib/ruby/1.9.1/irb/completion.rb:9:in `require': no such file to load -- readline (LoadError) from /usr/local/lib/ruby/1.9.1/irb/completion.rb:9:in `<top (required)>' from /usr/local/lib/ruby/gems/1.9.1/gems/railties-3.0.3/lib/rails/commands/console.rb:3:in `require' from /usr/local/lib/ruby/gems/1.9.1/gems/railties-3.0.3/lib/rails/commands/console.rb:3:in `<top (required)>' from /usr/local/lib/ruby/gems/1.9.1/gems/railties-3.0.3/lib

Ruby 1.9.2 and Rails 3 cannot open rails console

﹥>﹥吖頭↗ 提交于 2020-01-18 21:34:12
问题 [gkaykck@main myApplication]$ rails console /usr/local/lib/ruby/1.9.1/irb/completion.rb:9:in `require': no such file to load -- readline (LoadError) from /usr/local/lib/ruby/1.9.1/irb/completion.rb:9:in `<top (required)>' from /usr/local/lib/ruby/gems/1.9.1/gems/railties-3.0.3/lib/rails/commands/console.rb:3:in `require' from /usr/local/lib/ruby/gems/1.9.1/gems/railties-3.0.3/lib/rails/commands/console.rb:3:in `<top (required)>' from /usr/local/lib/ruby/gems/1.9.1/gems/railties-3.0.3/lib

cannot load such file — pty (LoadError)

主宰稳场 提交于 2020-01-16 04:24:13
问题 Completely new to Ruby on Rails. My environment is Windows 2008 R2, and I just use the RailsInstaller to set it up. I was given a website, so I placed it under C:\Sites. I followed the guide, and installed rails, as you can see the version down there in the code. Then I ran "rails server" to try to start the service, but I was given error message about "therubyracer-heroku-0.8.1.pre3 not installed, so I did a gem install and bundle install after that. Then therubyracer-heroku threw bunch of

Why bundler doesn't see customized gem source?

爱⌒轻易说出口 提交于 2020-01-16 04:12:30
问题 First of all the thing is that I'm behind firewall so I can't use https://rubygems.org/ $ bundle install rails bundle install requires at least 0 argument: "bundle install". git@gitdev $ bundle install Fetching gem metadata from https://rubygems.org/........... Fetching gem metadata from https://rubygems.org/.. Resolving dependencies... Using rake (10.0.4) Gem::RemoteFetcher::FetchError: SSL_connect SYSCALL returned=5 errno=0 state=SSLv2/v3 read server hello A (https://s3.amazonaws.com

make RVM also load gems at vendor/gems

喜欢而已 提交于 2020-01-16 03:21:50
问题 I have a project (tracks) that ships its gems under vendor/gems . Some of these gems are no longer available trough rubygems, so a rake gems:install fails. I want rubygems to load gems from both the rvm-gem-dirs ( /usr/local/rvm/gems/ruby-1.8.7-p334@tracks, /usr/local/rvm/gems/ruby-1.8.7-p334@global ) and from the vendor/gems . How can I add such a dir to the rubygems load path? Is that possible at all? 回答1: Add the vendor/gems directory to the GEM_PATH environment variable. GEM_PATH=$GEM

Failed to build gem native extension ruby racer gem of different version

感情迁移 提交于 2020-01-16 01:31:29
问题 I copied the application from production and did bundle install to install all the missing gems that are in production version and not on my local machine. Gem.lock file has the rubyracer version '0.10.1'. So when it tried to install this version using bundle install following error appeared. Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension. /home/user/.rvm/rubies/ruby-1.9.3-p392/bin/ruby extconf.rb *** extconf.rb failed *** Could not create Makefile due to

Failed to build gem native extension ruby racer gem of different version

空扰寡人 提交于 2020-01-16 01:31:11
问题 I copied the application from production and did bundle install to install all the missing gems that are in production version and not on my local machine. Gem.lock file has the rubyracer version '0.10.1'. So when it tried to install this version using bundle install following error appeared. Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension. /home/user/.rvm/rubies/ruby-1.9.3-p392/bin/ruby extconf.rb *** extconf.rb failed *** Could not create Makefile due to

Managing system dependencies of ruby gems (e.g. mysql2 and openssl)

随声附和 提交于 2020-01-15 08:48:05
问题 TL;DR: Below is a tragic story of a how I lost about 8 hours of my life because different gems were looking for different versions of openssl that weren't there. In the course of coming here to beg for help and writing up everything I tried I've managed to implement the hackiest fix imaginable, at which point I have to get back on with actual work. But this solution seems totally inadequate for reasons I outline below. So I'm asking: Is there a proper way of specifying system dependencies for

ActiveModel::ForbiddenAttributesError

て烟熏妆下的殇ゞ 提交于 2020-01-15 07:45:06
问题 i've been following rails guide on creating and mounting an engine here.Created blog post and when i tried to comment ,it returned "ActiveModel::ForbiddenAttributesError in Blorgh::CommentsController#create " error. Comment controller require_dependency "blorgh/application_controller" module Blorgh class CommentsController < ApplicationController def create @post = Post.find(params[:post_id]) @comment = @post.comments.create(params[:comment]) flash[:notice] = "Comment has been created!"