我是Ruby / Rails的新手,但我还没有找到如何开始它(它几天前工作)。 我在actuall应用程序文件夹然后 rails s /Users/me/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems/dependency.rb:247:in `to_specs’: Could not find rails (>= 0) amongst [minitest-1.6.0, rake-0.8.7, rdoc-2.5.8] (Gem::LoadError) from /Users/me/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems/dependency.rb:256:in `to_spec’ from /Users/me/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems.rb:1210:in `gem’ from /usr/bin/rails:18:in `’ 所以当检查“gem列表”时,会有以下内容 rails (3.1.0, 3.1.0.rc8, 3.1.0.rc6) rails_config (0.2.4) 当我重新尝试“gem install rails”时,我得到了 Successfully installed rails-3.1.0 1 gem installed Installing ri documentation for rails-3.1.0… file ‘lib’ not found Installing RDoc […]
我是Ruby on Rails的新手。 这是我到目前为止所做的: 我已经安装了XCode,Homebrew,RVM,Ruby和Rails。 现在我如何让Sublime Text 2与Ruby on Rails一起使用?
我有rails 4,这是我的默认版本(我仍然想要它)。 但我想在我的电脑上添加rails 3.2。 在以下命令中: gem install rails -v 3.2.16 我有这个警告: railties’s executable “rails” conflicts with rails Overwrite the executable? [yN] 我想知道这是否会给我的4.0.1带来一些错误?
如何使用rvm安全地升级我的ruby on rails应用程序以使用新的ruby版本?
我已经坚持了一段时间。 我正在尝试从我的cocoa应用程序运行rails shell命令来创建新闻rails应用程序。 当我跑 ~/.rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.3/bin/rails new projectname 我能够创建一个新项目。 但是,如果我运行这样的东西 NSString *path = @”~/.rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.3/bin/rails”; NSString *script = [NSString stringWithFormat:@”%@ new ~/Desktop/testapp”, path]; system([script UTF8String]); 或这个 – (IBAction)buildProject:(NSButton *)sender { NSString *path = @”~/.rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.3/bin/rails”; NSArray *args = [NSArray arrayWithObjects:@”new”, @”~/Desktop/testapp”, nil]; NSTask *task = [NSTask new]; [task setLaunchPath:path]; [task setArguments:args]; [task launch]; } 我收到以下错误 /Users/dylanross/.rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.3/bin/rails:7:in `require’: no […]
我不小心将我的rails版本改为4.0.0。 我已经尝试过gem uninstall rails –version = 4.0.0.rc1并安装版本3.2.13但是当rails -v它仍然是版本4.0.0时。 然后我尝试了gem uninstall rails,它给了我“Successfully uninstalled rails-3.2.13”。 认为这很容易做到,但我找不到简单的解决方案。
在使用’sudo gem update –system’更新我的ruby设置后尝试启动rails控制台时,我尝试通过发出rails c执行rails控制台 我收到此错误: Users/myusername/.rvm/rubies/ruby-1.9.2-p136/lib/ruby/site_ruby/1.9.1/rubygems/dependency.rb:247:in `to_specs’: Could not find json (~> 1.4) amongst [Ascii85-1.0.1, abstract-1.0.0, actionmailer-3.1.1, actionmailer-3.1.0, actionmailer-3.0.9, actionmailer-3.0.5, actionmailer-3.0.3, actionpack-3.1.1, actionpack-3.1.0, actionpack-3.0.9, actionpack-3.0.5, actionpack-3.0.3, activemodel-3.1.1, activemodel-3.1.0, activemodel-3.0.10, activemodel-3.0.9, activemodel-3.0.5, activemodel-3.0.3, activerecord-3.1.1, activerecord-3.1.0, activerecord-3.0.9, activerecord-3.0.5, activerecord-3.0.3, activeresource-3.1.1, activeresource-3.1.0, activeresource-3.0.9, activeresource-3.0.5, activeresource-3.0.3, activesupport-3.1.1, activesupport-3.1.0, activesupport-3.0.10, activesupport-3.0.9, activesupport-3.0.5, activesupport-3.0.3, addressable-2.2.6, ansi-1.3.0, arel-2.2.1, arel-2.0.10, arel-2.0.9, arel-2.0.7, […]
当我使用rvm use 1.9.2 ,我得到Rails v3.0.0: vikas@admin1-DL-H61MXEL:~$ rvm use 1.9.2 –default Using /home/vikas/.rvm/gems/ruby-1.9.2-p320 vikas@admin1-DL-H61MXEL:~$ rails -v Rails 3.0.0 当我使用rvm use 2.0.0 ,我得到Rails v3.2.13: vikas@admin1-DL-H61MXEL:~$ rvm use 2.0.0 Using /home/vikas/.rvm/gems/ruby-2.0.0-p195 vikas@admin1-DL-H61MXEL:~$ rails -v Rails 3.2.13 我需要Rails v3.2.13和Ruby 1.9.2。 当我使用rvm use 1.9.2 –default和gem install rails -v 3.2.13 ,我收到以下错误: While executing gem … (Gem::FilePermissionError) You don’t have write permissions […]
在打开一个新的终端窗口(Mac OSX 10.7.2)并输入rails ,我得到了总是有趣的’rails当前没有安装…“消息。但是我输入rvm use default 1.9.2并且一切都很好用的世界。 我哪里做错了?
解 解决方案是将以下内容添加到production.rb的顶部: $:.unshift(File.expand_path(‘./lib’, ENV[‘rvm_path’])) # Add RVM’s lib directory to the load path. require “rvm/capistrano” # Load RVM’s capistrano plugin. set :rvm_ruby_string, ‘1.9.2@rails31dataserver’ # Or whatever env you want it to run in. set :rvm_bin_path, ‘/usr/local/rvm/bin’ 我之前缺少的部分是set :rvm_bin_path, ‘/usr/local/rvm/bin’因为我之前从未在Capistrano部署中使用过该配置设置,而且我做了一些。 哦,好吧,一天都工作。 信用转到irc.freenode.net上#rvm频道的tonyflint! 原帖 克利夫说 我正在运行RVM的系统安装 我正在通过Capistrano部署 我目前傻眼了。 基本上发生的事情是我正在尝试通过Capistrano进行部署,而且它很难,很难。 这是我的deploy.rb和production.rb文件的pastie(我正在做一个多阶段环境并省略staging.rb文件,因为它工作正常)。 http://pastie.org/2523675 以下是cap production deploy:setup的输出cap production deploy:setup : […]