我最近安装了linux,并且正在尝试ruby开发。我已经成功地安装了rvm,以及rails和sqlite3。我在Aptana RadRails中创建了一个测试应用程序,以确保我的安装工作正常。
不幸的是,当我试图运行我的应用程序时,我会收到以下错误:
/home/Daniel/Workspace/Dan_Test/Gemfile:1:in
<main>': undefined method源代码‘for main:Object (NoMethodError)
我不明白为什么我会收到这个错误。应用程序是在“rails new”下创建的默认程序;我没有添加任何新代码。我还运行了包安装,所以应该有合适的宝石。
非常感谢您的帮助!
以下是宝石文件:
source 'https://rubygems.org'
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '4.0.0'
# Use sqlite3 as the database for Active Record
gem 'sqlite3'
# Use SCSS for stylesheets
gem 'sass-rails', '~> 4.0.0'
# Use Uglifier as compressor for JavaScript assets
gem 'uglifier', '>= 1.3.0'
# Use CoffeeScript for .js.coffee assets and views
gem 'coffee-rails', '~> 4.0.0'
# See https://github.com/sstephenson/execjs#readme for more supported runtimes
# gem 'therubyracer', platforms: :ruby
# Use jquery as the JavaScript library
gem 'jquery-rails'
# Turbolinks makes following links in your web application faster. Read more: https://github.com/rails/turbolinks
gem 'turbolinks'
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
gem 'jbuilder', '~> 1.2'
group :doc do
# bundle exec rake doc:rails generates the API under doc/api.
gem 'sdoc', require: false
end
# Use ActiveModel has_secure_password
# gem 'bcrypt-ruby', '~> 3.0.0'
# Use unicorn as the app server
# gem 'unicorn'
# Use Capistrano for deployment
# gem 'capistrano', group: :development
# Use debugger
# gem 'debugger', group: [:development, :test]发布于 2014-02-03 23:40:35
请原谅,问题是我是如何安装rvm的。我设置了bashrc中不存在的路径: source /etc/provile.d/rvm.sh,而不是/etc/profile.d/rvm.sh。这似乎引起了我的大部分问题。
感谢您的耐心!
https://stackoverflow.com/questions/21537621
复制相似问题