rubygems

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

How do I use frozen Capistrano?

戏子无情 提交于 2019-12-13 00:25:34
问题 Backstory I'm on Rails 2.1 and need to freeze the Capistrano gem to my vendor folder (as my host has broken their cap gem dependencies and I want to make myself as independent as possible). On my local windows machine I've put the following my environment.rb config.gem "capistrano", :version => "2.5.2" config.gem "net-ssh", :lib => "net/ssh", :version => "2.0.4" config.gem "net-scp", :lib => "net/scp", :version => "1.0.1" config.gem "net-sftp", :lib => "net/sftp", :version => "2.0.1" config

How to debug a plugin or gem using ruby-debug gem, where the part I wanted to debug started from test scripts?

﹥>﹥吖頭↗ 提交于 2019-12-12 21:23:43
问题 For example I have this gem called Authlogic-openid, that plugin is outdated, no longer supported, and broken (let me know if you know any alternative by the way). I wanted to make sure the test runs by keying ctrl+R on vendor/gems/authlogic-oid-1.0.4/test/acts_as_authentic_test.rb [Please do not attempt to try my steps below, the gem itself was already broken apart so I had to earlier fix up some paths and required libraries... just imagine them in your head] At first it returned LoadError:

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

Why is bundler insisting on an exact gem version number when the gemspec states an open constraint?

断了今生、忘了曾经 提交于 2019-12-12 19:03:22
问题 I'm contributing to the Ruby gem koudoku and trying to get Travis CI to work. The gem was set up with Travis a few days ago but all builds are failing with this error message (example): Bundler could not find compatible versions for gem "rack": In Gemfile: rspec-rails (~> 2.14.0) ruby depends on actionpack (>= 3.0) ruby depends on rack (~> 1.2.1) ruby capybara (>= 0) ruby depends on rack (1.0.0) The offending lines in the gemspec are: s.add_development_dependency "rspec-rails", "~> 2.14.0" s

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

How to make rake test not use the default minitest?

主宰稳场 提交于 2019-12-12 17:03:42
问题 I am following along the Make your own Gem Guide from RubyGems. Executing the rake test instructions fails as follows: > rake test ~/.rbenv/versions/2.1.2/lib/ruby/2.1.0/minitest/unit.rb:26:in `const_missing': uninitialized constant MiniTest::Test (NameError) <rest of output truncated> I figured that it is because the minitest version being used is 4.7.5 and not 5.6.0 (or any of the 5.0.0 series that is needed to have MiniTest::Test be valid). So I installed minitest 5.6.0 and now I have both

Unable to authenticate with omniauth-instagram, client_id missing

China☆狼群 提交于 2019-12-12 16:29:10
问题 I am authenticating using OmniAuth with both Twitter and Instagram. Twitter is working well. When I start the authentication process with the /auth/instagram request, OmniAuth is not including the client_id in the authorization header. I have initialized OmniAuth as: Rails.application.config.middleware.use OmniAuth::Builder do provider :twitter, ENV.fetch('TWITTER_CONSUMER_KEY'), ENV.fetch('TWITTER_CONSUMER_SECRET') provider :instagram, ENV.fetch('INSTAGRAM_CLIENT_ID'), ENV.fetch('INSTAGRAM

How to move your rake tasks to the rails lib dir from in a gem generator?

限于喜欢 提交于 2019-12-12 16:18:42
问题 Im creating a custom gem and have some rake files that need to be installed into the users /lib/tasks directory to work. I want create a generator that will move / create my rake tasks in the tasks directory so they can use them. Does anyone have any idea how do to this in a custom gem? 回答1: Ensure that your gemspec includes the tasks and then in your Rakefile require 'bundler' Bundler::GemHelper.install_tasks 回答2: You just need require your rake file in your Rakefile of your root project. 来源

Ruby on Rails SQLite problem on Windows 7 x64

耗尽温柔 提交于 2019-12-12 15:40:54
问题 When I try to do db:create on sqlite database with this db config using Windows 7 x64 development: adapter: sqlite3 database: db/development.sqlite3 timeout: 5000 I get this, kinda funny error unknown error C:/Ruby/lib/ruby/1.8/dl/import.rb:29:in `initialize' C:/Ruby/lib/ruby/1.8/dl/import.rb:29:in `dlopen' C:/Ruby/lib/ruby/1.8/dl/import.rb:29:in `dlload' C:/Ruby/lib/ruby/1.8/dl/import.rb:27:in `each' C:/Ruby/lib/ruby/1.8/dl/import.rb:27:in `dlload' C:/Ruby/lib/ruby/gems/1.8/gems/sqlite3-ruby