Вопрос о новичке здесь. Я пытался установить направляющие 4.2.4 на моем LTS Ubuntu 14.04. Я думаю, что достиг его с помощью RVM, но я не уверен, установлено ли все необходимое, потому что, когда я пытаюсь использовать команду: сервер направляющих (для установки нового приложения), это сообщение появляется:
sara@sara:~/Escritorio/Rails/pinteresting$ rails server
Ignoring executable-hooks-1.3.2 because its extensions are not built. Try: gem pristine executable-hooks --version 1.3.2
Ignoring gem-wrappers-1.2.7 because its extensions are not built. Try: gem pristine gem-wrappers --version 1.2.7
Ignoring nokogiri-1.6.6.2 because its extensions are not built. Try: gem pristine nokogiri --version 1.6.6.2
bin/rails:6: warning: already initialized constant APP_PATH
/home/sara/Escritorio/Rails/pinteresting/bin/rails:6: warning: previous definition of APP_PATH was here
Usage: rails COMMAND [ARGS]
The most common rails commands are:
generate Generate new code (short-cut alias: "g")
console Start the Rails console (short-cut alias: "c")
server Start the Rails server (short-cut alias: "s")
dbconsole Start a console for the database specified in config/database.yml
(short-cut alias: "db")
new Create a new Rails application. "rails new my_app" creates a
new application called MyApp in "./my_app"
In addition to those, there are:
destroy Undo code generated with "generate" (short-cut alias: "d")
plugin new Generates skeleton for developing a Rails plugin
runner Run a piece of code in the application environment (short-cut alias: "r")
All commands can be run with -h (or --help) for more information
Я не знаю, что сделать. Я забыл что-то в установке? Возможно, дополнительная программа необходима?
Спасибо
Я просто сделал это на своей машине Ubuntu 14.04.3:
cd ~
rails new test-app
cd test-app
rails server
... и это запускает право. Таким образом, мне кажется, что у Вас есть проблема с Вами приложение. Попробуйте то, что я сделал и вижу, как это идет.
кроме того, я испытал только затруднения с rvm
на Ubuntu. Так, я использую rbenv
( https://github.com/sstephenson/rbenv).
Для установки rbenv
сделайте:
# remove old rvm
sudo apt-get remove rbenv ruby-bundler ruby-rvm
# common rbenv and rails dependencies, generally good things to have
sudo apt-get install zlib1g-dev openssl libreadline-dev git-core libnotify-dev \
libc6-dev libssl-dev libmysql++-dev libsqlite3-dev \
make build-essential libssl-dev libreadline6-dev \
libyaml-dev curl
# rbenv installer
curl https://raw.githubusercontent.com/fesplugas/rbenv-installer/master/bin/rbenv-installer | bash
# Add rbenv init to .bashrc
echo 'export RBENV_ROOT="$HOME/.rbenv"' >> ~/.bashrc
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc
echo 'if which rbenv > /dev/null; then eval "$(rbenv init -)"; fi' >> ~/.bashrc
exec $SHELL
# Install ruby (this takes many minutes ...~15-ish ...maybe 30 depending on your system)
rbenv install 2.2.2
# Defining which ruby version to use globally
rbenv global 2.2.2
кроме того, разработке направляющих на Ubuntu помог бы Prax ( https://github.com/ysbaddaden/prax), это похоже на Голову, но для Linux и это записано в чистом Ruby.
РЕДАКТИРОВАНИЕ:
я попробовал pinteresting
приложение, и оно также запустило прекрасный для меня:
# I had to install a 2.0.0 version of Ruby
rbenv install 2.0.0-p645
cd ~
git clone https://github.com/onemonthrails/pinteresting
cd pinteresting
echo '2.0.0-p645' > .ruby-version
bundle install
rake db:migrate
rails server