gems

Cocoapods commands fail due to “No such file or directory @ dir_initialize - /Users/<username>/.cocoapods/repos (Errno::ENOENT)”

匿名 (未验证) 提交于 2019-12-03 02:52:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: Can anyone help me resolve the error in the stack trace below? This occurs when I run any pod command. I've uninstalled and reinstalled the gem with no luck. 00:44:05-David~/dev/farecast-app (master)$ pod setup Setting up CocoaPods master repo /usr/local/rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/pathname.rb:422:in `open': No such file or directory @ dir_initialize - /Users/David/.cocoapods/repos (Errno::ENOENT) from /usr/local/rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/pathname.rb:422:in `foreach' from /usr/local/rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0

Weird rails error “permission denied: bin/rails” for old rails apps

匿名 (未验证) 提交于 2019-12-03 02:50:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: I'm getting this error whenever I run rails (or any rails command) _rails_command:2: permission denied: bin/rails ONLY when i'm inside some old rails app directory. In these directories bundle exec rails c command works but rails or even rails -v don't work. Background: I keep my coding workspace in dropbox folder. Now I recently installed Manjaro and hence all the rails apps which I downloaded back from my previous OS I call them old rails app. In Short: Rails works fine everywhere except for old rails apps. bundle exec rails c

Rails console in production: NameError: uninitialized constant

匿名 (未验证) 提交于 2019-12-03 02:50:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I have a rails app (rails 5). In development, everything work, when i use rails console And enter an instruction, for example User.all , it's working. In production, my app work perfectly, no problems, no errors, but when i use rails console production and enter for example User.all i have an error : NameError: uninitialized constant User from (irb):2 from /home/alexandre/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/railties-5.0.0.1/lib/rails/commands/console.rb:65:in `start' from /home/alexandre/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0

How to do live reload with Rails 4 and Ruby 2.0 app?

匿名 (未验证) 提交于 2019-12-03 02:49:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: I want to see live changes in browser if I edit .scss or .erb file in text Editor in Rails 4 + Ruby 2.0 project. I tried Guard and Guard-live-reload, but it's throwing the following error. 22 : 58 : 04 - ERROR - Could not load 'guard/rspec' or find class Guard :: Rspec 22 : 58 : 04 - ERROR - /home/ jitendra /. rvm / gems / ruby - 2.1 . 1@global / gems / guard - 2.6 . 1 / lib / guard / plugin_util . rb : 100 : in `require' > [#] /home/jitendra/.rvm/gems/ruby-2.1.1@global/gems/guard-2.6.1/lib/guard/plugin_util.rb:100:in ` plugin

Jekyll - command not found

匿名 (未验证) 提交于 2019-12-03 02:49:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I am trying to get Jekyll running but I have no experience with Ruby. As far as I can tell the installation of Jekyll has succeeded. However: $ jekyll Gives an error: -bash: jekyll: command not found This is the gem env result: - RUBYGEMS VERSION: 1.3.4 - RUBY VERSION: 1.8.7 (2010-01-10 patchlevel 249) [universal-darwin10.0] - INSTALLATION DIRECTORY: /Volumes/HDD/DADU/gems - RUBY EXECUTABLE: /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby - EXECUTABLE DIRECTORY: /Volumes/HDD/DADU/gems/bin - RUBYGEMS PLATFORMS: - ruby -

Rails / javascript: “too many parameter keys” - what's a good way to normalize form data?

匿名 (未验证) 提交于 2019-12-03 02:48:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I'm using rails 3.1.3. I have a form with a lot of fields. When the form is submitted, I get this error ERROR RangeError: exceeded available parameter key space /home/james/.rvm/gems/ruby-1.9.3-p0/gems/rack-1.3.6/lib/rack/utils.rb:99:in `block in parse_nested_query' /home/james/.rvm/gems/ruby-1.9.3-p0/gems/rack-1.3.6/lib/rack/utils.rb:93:in `each' /home/james/.rvm/gems/ruby-1.9.3-p0/gems/rack-1.3.6/lib/rack/utils.rb:93:in `parse_nested_query' /home/james/.rvm/gems/ruby-1.9.3-p0/gems/rack-1.3.6/lib/rack/request.rb:302:in `parse_query' /home

How to handle exceptions with Ruby Rest-Client

匿名 (未验证) 提交于 2019-12-03 02:47:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: I recently switched from Ruby's Net:HTTP class to rest-client 1.6.7. I find it a lot easier to form requests, but unlike Net:HTTP request, when rest-client gets anything other than a 200, the request dies. I've tried putting a breakpoint directly after the RestClient.get, and it never gets hit - so I'm doing something wrong. def get_member_using_card resource = "#{@settings_app_uri}api/v1/card/#{self.member_card_num}?token=#{@settings.api_key}" response = RestClient . get resource if response . code == 200 card = JSON . parse (

Ruby on Rails MySQL #08S01Bad handshake - downgrade MySQL?

匿名 (未验证) 提交于 2019-12-03 02:46:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: We recently upgraded from MySQL 5.1.41 to 5.1.61 on our Ubuntu 10.04LTS server. We have an ancient RoR web app that's now giving a bad handshake error: Mysql::Error in MainController#index #08S01Bad handshake /usr/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/vendor/mysql.rb:523:in `read' /usr/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/vendor/mysql.rb:153:in `real_connect' /usr/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/connection_adapters/mysql_adapter.rb:389:in `connect' /usr/lib/ruby/gems

BCrypt::Errors::InvalidSalt: invalid salt Devise

匿名 (未验证) 提交于 2019-12-03 02:38:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I'm getting this error when i try to create new User, like this >> User.create(:email=>"nandosousafr@gmail.com", :password => "hello") BCrypt::Errors::InvalidSalt: invalid salt from /Library/Ruby/Gems/1.8/gems/bcrypt-ruby-3.0.1/lib/bcrypt.rb:56:in `hash_secret' from /Library/Ruby/Gems/1.8/gems/bcrypt-ruby-3.0.1/lib/bcrypt.rb:161:in `create' from /Library/Ruby/Gems/1.8/gems/devise-2.1.2/lib/devise/models/database_authenticatable.rb:110:in `password_digest' from /Library/Ruby/Gems/1.8/gems/devise-2.1.2/lib/devise/models/database

VPS apache config - Invalid command 'PassengerDefaultRuby' after adding latest passenger gem

匿名 (未验证) 提交于 2019-12-03 02:34:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: used to have this list of rubies in my vps: ruby-1.9.2-p320 [ i686 ] =* ruby-1.9.3-p194 [ i686 ] ruby-1.9.3-p374 [ i686 ] ruby-1.9.3-p392 [ i686 ] today I installed a new app on this vps on ruby 2.0 , so I added 2.0 to rvm : ruby-1.9.2-p320 [ i686 ] ruby-1.9.3-p194 [ i686 ] ruby-1.9.3-p374 [ i686 ] ruby-1.9.3-p392 [ i686 ] =* ruby-2.0.0-p247 [ i686 ] installed passenger and passenger-apache-module , instructions says to add these lines: LoadModule passenger_module /usr/local/rvm/gems/ruby-2.0.0-p247/gems/passenger-4.0.19/buildout/apache2/mod