gem

Deploying Sinatra app on Dreamhost/Passenger with custom gems

冷暖自知 提交于 2019-12-22 10:48:24
问题 I've got a Sinatra app that I'm trying to run on Dreamhost that makes use of pony to send email. In order to get the application up and running at the very beginning (before adding pony), I had to gem unpack rack and gem unpack sinatra into the vendor/ directory, so this was my config.ru: require 'vendor/rack/lib/rack' require 'vendor/sinatra/lib/sinatra' set :run, false set :environment, :production set :views, "views" require 'public/myapp.rb' run Sinatra::Application I have already done

Jenkins Slave Doesn't Use Same Ruby Version As On Local Terminal

杀马特。学长 韩版系。学妹 提交于 2019-12-22 10:17:52
问题 I am using a OSX Jenkins slave to run some build commands for Xcode. When I run gem environment in my local terminal, this is what I get. RubyGems Environment: - RUBYGEMS VERSION: 2.4.8 - RUBY VERSION: 2.2.0 (2014-12-25 patchlevel 0) [x86_64-darwin15] - INSTALLATION DIRECTORY: /Users/nvitas/.rvm/gems/ruby-2.2.0 - RUBY EXECUTABLE: /Users/nvitas/.rvm/rubies/ruby-2.2.0/bin/ruby - EXECUTABLE DIRECTORY: /Users/nvitas/.rvm/gems/ruby-2.2.0/bin - SPEC CACHE DIRECTORY: /Users/nvitas/.gem/specs -

ERROR: While executing gem … (Gem::FilePermissionError)

纵饮孤独 提交于 2019-12-22 09:48:36
问题 $ gem install passenger Fetching: passenger-4.0.5.gem (100%) ERROR: While executing gem ... (Gem::FilePermissionError) You don't have write permissions for the /Users/snowcrash/.rvm/gems/ruby-2.0.0-p195 directory. $ ls -ld /Users/snowcrash/.rvm/gems/ruby-2.0.0-p195 drwxrwsr-x 8 root rvm 272 21 May 16:07 /Users/snowcrash/.rvm/gems/ruby-2.0.0-p195 Clearly my version of ruby is owned by root/rvm. I'm not happy with this SO answer which suggests making .gem/specs world-writable: Permission denied

How do I fix Rails installation errors?

邮差的信 提交于 2019-12-22 09:39:15
问题 I just installed everything needed for Ruby on Rails on my Ubuntu system. But, when I use the rails command, it outputs these errors: root@laptop3:/var/lib/gems/1.8/specifications# rails -v Invalid gemspec in [/var/lib/gems/1.8/specifications/activemodel-3.2.0.gemspec]: Illformed requirement ["#<YAML::Syck::DefaultKey:0xb632551c> 3.2.0"] Invalid gemspec in [/var/lib/gems/1.8/specifications/activerecord-3.2.0.gemspec]: Illformed requirement ["#<YAML::Syck::DefaultKey:0xb61ac1b8> 3.2.0"]

CocoaPods Installation Failure (Unable to resolve dependencies)

て烟熏妆下的殇ゞ 提交于 2019-12-22 08:23:07
问题 I have a problem while installing CocoaPods on MacOS X 10.3. The first try fails with a DependencyError for nap. I install nap and try again with the same result. Uninstalling and reinstalling doesn't help. andreass-mbp:~ AndreasB$ sudo gem uninstall cocoapods Password: andreass-mbp:~ AndreasB$ sudo gem uninstall nap Successfully uninstalled nap-1.0.0 andreass-mbp:~ AndreasB$ sudo gem install nap Fetching: nap-1.0.0.gem (100%) Successfully installed nap-1.0.0 Parsing documentation for nap-1.0

How can I write a hook that gets called when a RubyGem is installed?

萝らか妹 提交于 2019-12-22 08:07:01
问题 I'd like to write a Ruby snippet that gets run when my Gem is first installed via [sudo ]gem install mygem . Can it be done? 回答1: It doesn't look like it's really supported. I found a "post_install_message" attribute that you should be able to set in the gem spec, but that won't execute code. You may be able to do it by packaging your on-install code as an extension in your gem (as if it were a native extension), and providing a Rakefile to "build" the extension (i.e. call your code). 回答2: I

Rails 3.2 app - Should I use a versioning gem (paper_trail or vestal_versions) or handle it manually?

梦想与她 提交于 2019-12-22 07:37:21
问题 My question: Should I roll my own model versioning or use one of the versioning gems that's already out there? If I should use a gem, which one seems best for this application? Info about my app My app is a simple Checklist app. There are Checklists and Jobs, and I track user responses with Responses and Submissions. The Response tells me what the use said ("Done", with a note "We need more mops.") and the Submission tells me when that particular Checklist was filled out (because there may be

Deployment using Capistrano + Gitlab using via: remote_cache

萝らか妹 提交于 2019-12-22 06:47:10
问题 I am using capistrano for the deployment of an PHP web application and we are having an internal gitlab server which is not accessible outside the network. I am trying to deploy using remote_cache as it is taking to much time if use it for copy. I have already checked This and This but not getting the desired result. I am trying the below code. set :default_stage, "staging" ssh_options[:forward_agent] = true server "servername", :app, :web, :db, :primary => true set :application, "appname"

how to solve“ DL is deprecated, please use Fiddle” Rails 4.1.8?

早过忘川 提交于 2019-12-22 06:31:30
问题 i install ruby on rails package, and check the version. when i check rails version it show DL is deprecated, please use Fiddle. How to solve DL is deprecated, Please use Fiddle ? i am using Windows 8.1 thanks before. 回答1: Since Ruby 2.0.0 deprecated DL to move towards fiddle movement, your best answer can be found here to get rid of the warning message that I also encountered a while ago. Good luck! 来源: https://stackoverflow.com/questions/30146567/how-to-solve-dl-is-deprecated-please-use

Rails - Understanding application.js and application.css

余生长醉 提交于 2019-12-22 06:06:09
问题 New to rails. Just trying to understand these two files in the \assests directory. For example, the application.js file has lines such as: //= require jquery //= require jquery_ujs //= require_tree . I understand the require_tree . simply adds all JS files in the current directory. And by context, I can tell that require jquery adds the jQuery libraries. But where does it get these jQuery libraries from? I don't see any jquery.js files in my assets folder -- or in my entire application